LoginSignup
0
1

More than 3 years have passed since last update.

Awake, Start, Updateの違い

Posted at

Awake

  • 全てのオブジェクトが初期化された後に読み込まれる。
  • 必ずStartの前に読み込まれる。
  • scriptが有効か無効かに関わらず読み込まれる。(Unity上のチェックを外しても読み込まれます。)

Start

  • Updateメソッドが最初に読みこまれる直前に読み込まれる。
  • scriptが無効だと読み込まれない。

Update

  • 毎フレーム読み込まれる。
  • パソコンの性能によって読み込まれる回数が変わってくるため、Time.deltaTimeを使って性能差を埋める必要がある。

MonoBehaviourとは

  • Unityで読み込まれる全てのscriptのベースクラス。
  • C#を使うときは、MonoBehaviourから引き出して使う。

 公式Document
 参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1