Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.5f1
2021.1
2021.2
2022.1
Issue ID
1357510
Regression
No
Awake function called after OnEnable
How to reproduce:
1. Open the attached project "temp.zip"
2. Open the SampleScene scene
3. Press the Play button
4. Open the Console window
Expected results: Awake functions are called first
Actual results: Awake functions aren't called first
Reproducible with: 2019.4.29f1, 2020.3.17f1, 2021.1.16f1, 2021.2.0b7, 2022.1.0a5
Notes:
- Changing scripts order in the inspector doesn't change results
- When both functions (awake and onenable) are in different scripts this bug happens
- If both functions are in the same script everything works fine
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Joint Gizmos for anchor and connectedAnchor do not respect their defined bodies when Swap Bodies is enabled
- Project Settings window opens up with a blank details pane when the "Configure" button is clicked in the Package Manager after installing the Cloud Diagnostics package
- [UI Builder] Viewport's gizmos for Margin and Padding disappear when dragging to modify the value and the cursor leaves the Spacing section
- "Multiplayer Center" window does not reflect changes made in "Other Packages" section
- Crash on D3DKMTOpenResource when capturing with RenderDoc while GPU Skinning is set to GPU(Batched)
Resolution Note (2022.1.X):
Enable and Awake messages are handled "by component", not "by game object". We guarantee that for a given component, the Awake message is received before the "Enable" message. But we don't guarantee this across component: the reported screenshot is valid in that sense: by design, EnableLog behaviour can receive both its Awake and Enable events before the AwakeLog behaviour receives any of the messages.