When it comes to learning game engines, there is not a definite path to go down.
Some people like learning the programming languages this way, some people like learning that way.
Some like following tutorials and not focus so much on code. Some don’t even code at all and either use a Visual Scripting tool or hire people to do it for them.
Everyone says their way is the best, but the truth is that everyone learns differently – what works for me might not work for you.
There are so many ways that you can learn and get started with programming in Unity that i cannot cover all of them. I can, however, provide simple explanations to what i believe are the most effective methods.
These methods are generic, and can probably be used in pretty much every engine you’ll be using, not just unity.
Getting familiar with the engine and learning as you go to suit your needs.
With this method, you won’t be learning the programming language specifically. You will be building your game and learning how to write the code for your it as you go. Need feature X? Search for implementations on Google, Youtube, StackOverflow, ask on forums, until you find a solution. Lots of times, people will give you advice on how you can improve your programming and that will help maintaining a clean and easy to use environment.
This method will often lead to writing “ugly code” – since you’re not learning the programming language and its best practices, chances are there is a more effective solution to the problem you’re facing.
Learning the programming language you’re going to use and applying it in the engine-specific environment.
In Unity, it’s recommended that you use C#. With this method, you’d see yourself using Microsoft’s tools to learn the language, its best practices and most used conventions and then bringing that C# knowledge over to Unity and adapting it to fit the engine. This method is the most difficult and is often considered scary, because it has you learn the language and then it has you learn how to adapt said language to the engine, giving you a larger amount of work compared to the one you’d have using the other methods described here.
That being said, if you have never learned a Computer Language before, this may be a better route for you. Sometimes tutorials that pair C# and Unity can rush through the basics, which will be confusing if you don’t know programming fundamentals.
Learning the language in the context of the engine you’re using.
This was the method that i personally used to learn C# and Unity – it helped me to know both the language and the engine-specific adaptations. Although i had some prior contact with C#, this method does not require it. Pick up a C# Unity tutorial and learn how the code functions, its main elements and how those elements and those functions interact with the environment it’s in. As time goes by, you’ll see that you picked up enough knowledge of the language to use it in another framework and that you already know how to handle it within the engine.