Made a few games in Unity, here are some easily mistaken points when developing as a beginner

Basically this article is for myself as a reminder, so no explanation, just bullet points.

  • Don’t put coroutines in Update(), there are several ways to avoid doing it.
  • To make the UI canvas scale with screen and not misplace when changing resolution, select “scale with screen size” instead of constant pixel size.
  • To use OnTriggerEnter() series function, Rigidbody component is needed.
  • Transform.rotation returns and reads quaternions. For 2D games that no need to use quaternions, use Transform.EulerAngle instead.
  • Pausing game by Time.timeScale cannot affect sound, need to control separately.
  • You can change the “size” of a sprite by setting a different value of pixel per unit.
  • You can change the pivot of a sprite that can keep the two different size but related sprite at the “same place”. E.g. weapon sprites.

Will add if I remembered or encounter more.

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started