LEARNING C#
I’m learning C# for Unity game development from a YouTuber named "CodeMonkey," and I’ve reached the intermediate section. However, I’m confused about how to implement the code I’ve learned in Unity. For example, I’ve learned how to create a class, but I don’t understand where and how to use that code in Unity.
25 Replies
I'd recommend getting started on C# itself with some very small and basic $projects and then jumping into unity for that exact reason, you won't know exactly what youre doing
However if you want to write code and implement in unity all you have to do is create a new MonoBehaviour script from unity (or manually if you know how), then attach it to a game object as a component
Collections of application ideas that anyone can solve in any programming language to improve coding skills:
https://github.com/dotnet/dotnet-console-games
https://github.com/karan/Projects
https://github.com/florinpop17/app-ideas
and how will i learn unity api implementation
how will i discover things which are uknown to me?
Well, you can just look at Unity's API documentation, right?
Try to do something, if you don't know then search about what you don't know
For example, I want to get weather data from openweatherapi but idk how to do requests, I then search how to do an http request and then try to continue from there
Trial and a lot of errors
its daym confusing for me
i see isee
Lul yes
Anyway, it seems that Unity can also support regular NuGet packages.
as a professional never coded c# in my life i can say that this is the way i learnt literally everything similar to it
i learnt russian danis python and most of my maths knowledge by "lets do X, wait i cant, google"
Model and view are your friends. This means doing the game logic code and the presentation code in separate modules. The logic bit is going to be the same in Unity or outside Unity, while the View will be tailored to Unity or some other engine.
@UMAR When you try to code something, Make sure you try with different approaches and settle for one. Don't just blindly start coding in your projects. Think before action after. I am saying this because I have done some mistakes in past, like I used to overcomplicate even the simplest logic. And yea, as others are saying, Google is your best friend if you know how to use it. Read the docs, watch tutorials but not blindly follow them, try to add your own twist into things. Thats learning.
Ight noted sir
Thankyou so much everyone
where are you in the course right now?
Intermediate, code monkey
btw I love codemonkeys channel if you didn knew
Now ive shifted to udemy
no like intermediate where? topic?
Oh, intermediate class
oh nice
yea but still, after you watch a single tutorial video, try to make the same thing by yourself again, Like for classes, if the tutorial had an example of like a class named Sword with some methods and fields, make your own but different class like a Car for eg with different methods and other stuff, It will really help
Yessir i do that but i was still confused with what im actually doing so i had to shift to udemy
why is it all white
it is reslly really throwing me off
the code all works completely fine
just looks disgraceful
please do not hijack others people thread nor crosspost your message
if u need help open your own thread, but do not post in every single channel.
oh sorry i thought this was a general threat
Its not, they are individual per the person who created it, and you're fine to create your own just make sure u keep the question in one place.
yea ofc, my bad