Unity tips
Random tips
-
GameManager.cs script and Game Manager Empty Object.
See lesson.
and then
gameManager = GameObject.Find("Game Manager").GetComponent<GameManager>();from lesson.
-
Getting Rigidbody for self
targetRb = GetComponent<Rigidbody>();See lesson.
-
Coroutines
StartCoroutineSee lesson.
-
GameObject of self is just
gameObjectSee lesson.
-
ParticleSystem
Make it public, assign in GUI, and call
Instantiatewhen needed. See lesson. -
Canvas and Text Mesh Pro and Anchor Points
See lesson.
-
AddListeneron buttonsSee lesson.
-
Nested Prefabs
See lesson.
-
Persist volume level between restarts (scene reloads)
Use static variable to store the value.
-
Pausing the game
See that article.
- Cick-and-Swipe
See guide.
- SerializeField
Makes (private) variable visible in Editor. See lesson.
FixedUpdateandLateUpdate
FixedUpdate – to calculate physics and movement, LateUpdate – to calc camera movement.
From lesson.
AwakeandStart
See lesson.