📜  unity何时被唤醒 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:05.794000             🧑  作者: Mango

代码示例1
/*
Awake is called when the script instance is being loaded.
'Loaded' means here in default enter Play Mode.
If you add unity attributes that change the default behaviour like
execute always or execute in edit mode only, the instance is created also in
Edit Mode, after the script is reimported by unity.
Awake is used to initialize any variables or game state before the game starts.
 ... Awake is called after all objects are initialized.
So you can safely speak to other objects or query them using eg. gameObject.
*/