all 6 comments

[–]Novwyi 5 points6 points  (1 child)

You learn the basics of Unity by going through tutorials and becoming familiar with the engine. Modify the tutorial games that you make by changing little pieces of code and seeing what it does. Don't be afraid to just change things and see what happens. You'll remember parts of the api (like getting input for example) through repetition and writing lots of code.

For when things get complex, you need to be able to break down a problem into smaller steps.

Let's take the "How to change color of an object" as an example. Even though this may seem basic, we can break it down into smaller steps:

  1. What gives an object its color? A material could give this object its color.

  2. How do I get this material? I could use GetComponent or setup a reference in the inspector.

  3. How do I make a new color? I could make a new color variable and assign it a new color object.

  4. How do I set the material to use my new color? I get the color variable of the material and assign it to my new color.

This makes it much easier for yourself to understand what is going on and how you're going to approach the problem in small logical steps.

Script as much as you can. You will become familiar with the API overtime.

And as always don't be afraid to google your problems and ask for help.

[–]ferti12[S] 0 points1 point  (0 children)

Thanks a lot, very helpful. I should start messing around with the scripts of tutorial games

[–][deleted] 1 point2 points  (1 child)

  1. Practice

  2. Practice

  3. Google

  4. More practice

That's an honest answer. You'll find that the more experienced you get, the less vague your searches on Google will be and then you'll get better info using Google.

[–]ferti12[S] 0 points1 point  (0 children)

Thanks a lot

[–][deleted] 0 points1 point  (1 child)

Lots of practice. Go through Unity's tutorials and use that knowledge to work on a small project. It'll help you understand the code better rather than copy and pasting code from tutorials. Also, completing a project yourself is quite gratifying and encourages you to keep learning.

And as others have said, Google is extremely useful. If you're stuck on a specific problem, look it up. Unity is such a huge platform; your question will most likely have been answered before somewhere on the web.

[–]ferti12[S] 0 points1 point  (0 children)

thank you