Unity tips

less than 1 minute read

Random tips

  1. Edit the playmode tint color

  2. Introduction to project management and teamwork

  3. GameManager.cs script and Game Manager Empty Object.

    See lesson.

    and then

    gameManager = GameObject.Find("Game Manager").GetComponent<GameManager>();
    

    from lesson.

  4. Getting Rigidbody for self

    targetRb = GetComponent<Rigidbody>();
    

    See lesson.

  5. Coroutines StartCoroutine

    See lesson.

  6. GameObject of self is just gameObject

    See lesson.

  7. ParticleSystem

    Make it public, assign in GUI, and call Instantiate when needed. See lesson.

  8. Canvas and Text Mesh Pro and Anchor Points

    See lesson.

  9. AddListener on buttons

    See lesson.

  10. Nested Prefabs

See lesson.

  1. Persist volume level between restarts (scene reloads)

    Use static variable to store the value.

  2. Pausing the game

See that article.

  1. Cick-and-Swipe

See guide.

  1. SerializeField

Makes (private) variable visible in Editor. See lesson.

  1. FixedUpdate and LateUpdate

FixedUpdate – to calculate physics and movement, LateUpdate – to calc camera movement. From lesson.

  1. Awake and Start

See lesson.

Updated: