C
C#2w ago
UMAR

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
Gax
Gax2w ago
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
MODiX
MODiX2w ago
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
UMAR
UMAROP2w ago
and how will i learn unity api implementation how will i discover things which are uknown to me?
Sephiroth
Sephiroth2w ago
Well, you can just look at Unity's API documentation, right?
Gax
Gax2w ago
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
UMAR
UMAROP2w ago
its daym confusing for me i see isee
Sephiroth
Sephiroth2w ago
Lul yes Anyway, it seems that Unity can also support regular NuGet packages.
fireee
fireee2w ago
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"
Anton
Anton2w ago
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.
Maujey
Maujey7d ago
@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.
UMAR
UMAROP7d ago
Ight noted sir Thankyou so much everyone
Maujey
Maujey7d ago
where are you in the course right now?
UMAR
UMAROP7d ago
Intermediate, code monkey
Maujey
Maujey7d ago
btw I love codemonkeys channel if you didn knew
UMAR
UMAROP7d ago
Now ive shifted to udemy
Maujey
Maujey7d ago
no like intermediate where? topic?
UMAR
UMAROP7d ago
Oh, intermediate class
Maujey
Maujey7d ago
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
UMAR
UMAROP7d ago
Yessir i do that but i was still confused with what im actually doing so i had to shift to udemy
fireee
fireee7d ago
No description
fireee
fireee7d ago
why is it all white it is reslly really throwing me off the code all works completely fine just looks disgraceful
leowest
leowest7d ago
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.
fireee
fireee7d ago
oh sorry i thought this was a general threat
leowest
leowest7d ago
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.
fireee
fireee7d ago
yea ofc, my bad

Did you find this page helpful?