Hi guys
Do I if I have mastered the application programming for c#, does this help me in c # For unity.
Or there is another way to learn unity c# programming.
Hi guys
Do I if I have mastered the application programming for c#, does this help me in c # For unity.
Or there is another way to learn unity c# programming.
Yes if you have mastered C# outside of Unity, it will be extremely helpful for you in Unity.
Have you mastered C# outside of Unity? If you have you should be able to take a quick look at Unity and determine this for yourself.
What does it even mean to âmasterâ C#? Iâve been writing C# for 15ish years now and I wouldnât say Iâve mastered it. Iâm just pretty darn good at it.
âŚ
Unityâs use of C# can get a little complicated in the details. But if you have experience in C# then this should give you an idea.
Unity originally started out utilizing the Mono Runtime open source implementation of the .Net runtime and targeting the .net 2.0 standard.
Unity later got it up to âjust shy ofâ .net 3.5 support, as well as nearly all of C# 3.0 specification (runtime, framework, and language version arenât the same thing). They were stuck on this for a long time though due to licensing issues with Xamarin, the people behind mono.
Unity got their IL2CPP implementation up to adequate speed to work around their mono issues. This actually takes CIL and converts it to C++ and then compiles it natively. As a result some .net framework features that rely on runtime compilation wonât work.
Microsoft release .net core and Unity and Microsoft begin to collaborate. Visual Studio is now included with Unity, and .net 4.x support is added bringing C# upto version 6.0, and I believe maybe 7.0 support. (you must go into player settings and ensure youâre targeting 4.x framework)
Considerations you must make are things like windows specific libraries arenât included directly, and if you force them in you will break cross-platform support. (think WinForms and the ilk)
Also the whole IL2CPP considerations where dynamically compiled stuff canât be performed (think like emit libs).
But in the end C# is all there⌠itâs why I chose Unity, I love C#.
âŚ
With all that said. You still need to learn the Unity API.
You should check out the Unity Learn stuff, as well as the documentation, to get your head around that.
Unity Learn:
https://learn.unity.com/
Documentation:
https://docs.unity3d.com/ScriptReference/
âMasteringâ C# will help significantly with Unity. Mastering C# though is not required for Unity. You can get simple projects done while knowing just the basics of C#.
Oh, but it does.
If you have truly mastered C# with all itâs idiosyncracies you have proven that your nerves can withstand anythng. Only then will Unity come close, but it will not break you.
(written after a two-nighter hunting for an obscure shader bug that Unity came back to me this morning, acknowleding that itâs âon their list of things to fixâ)