Skip to main content



First code line in first component

Let's code!

See below how to add first component. Let say that components are bricks of your game. You can build whole behaviour of object in the scene from components. To learn more about Unity components you can refer to official Unity Manual.

Here is code added to the component:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicclassChangeColorComponent:MonoBehaviour{// Use this for initializationvoidStart(){GetComponent<SpriteRenderer>();}// Update is called once per framevoidUpdate(){}}
You don't understand what's going on or you've never programmed? Dont't worry!

Today's programming and programming programming are quite different from those 10 years ago or shown in movies. It is very easy now! And basically you learn by copying the code, modifying it, and observing how it works after the changes.

What's happening in line of code added by us - in the simple…

Latest Posts


First simple steps