Search Issue Tracker
Awake & Start not called before Update when assembly is reloaded for ExecuteInEditMode scripts
1. Open the attached project
2. Observe that "Awake", "Start", "Update" is displayed in the console (because of the ExecuteInEditMode script)
3. Reimport the script to trigger recompile
4. Move the camera around
5. Notice that "Update" is called without any calls to "Awake" and "Start"
Awake and Start are not called on the object because they were already called on this object upon its first creation. On load, the object state is serialized (public and private variables) and then deserialized. When deserialization happens, as long as the object already existed, Awake nor Start are not invoked.
This is by design, and it's tightly coupled in the MonoBehaviour lifecycle. Changing this behavior will possibly impact on all the projects that don't expect Awake/Start to be invoked.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Textures] CubemapArray API forces duplicate code because you cannot access individual cubemaps directly
- Duplicating a Prefab instance in the Scene will cause instances of the same Prefab to be disabled and re-enabled
- GUI.Button and GUILayout.Button stay in the normal GUIStyleState even when the normal GUIStyleState is changed to another one
- Particle System mesh UV coordinates change when mesh's geometry layout is changed on import
- [Windows] The Unity import progress is not shown in the Windows taskbar