Search Issue Tracker
By Design
Fixed in 2019.3.X
Votes
0
Found in
2019.3.0b9
2019.3.0f3
2020.1.0a11
Issue ID
1209226
Regression
Yes
Parent class Awake method is not called when Reload Scene setting is disabled and child class has [ExecuteInEditMode] attribute
How to reproduce:
1. Open the user-submitted project
2. Open the Sample Scene
3. Enter Play mode
Expected results: "Awake was called: True" is printed
Actual results: "Awake was called: False" is printed
Reproducible with: 2019.3.0b9, 2019.3.0f4, 2020.1.0a11, 2020.1.0a18
Not reproducible with: 2019.3.0b8, 2020.1.0a9
Notes:
The issue is not reproducible on Unity 2019.2 and below, because Enter Play Mode Settings functionality is not available.
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (2020.1.X):
This is an intentional change and by design.
See "Important differences due to skipping Scene Reload" in this thread: https://forum.unity.com/threads/configurable-enter-play-mode.768689/
"ExecuteInEditMode/ExecuteAlways scripts are not destroyed/awaken - no OnDestroy/Awake calls for those.
Watch out for Awake/OnEnable methods which check EditorApplication.isPlaying property - Awake is not called and OnEnable is called only when EditorApplication.isPlaying is already true on Play Mode change."
For any further discussion regarding this issue, we recommend that you discuss it in the thread: https://forum.unity.com/threads/configurable-enter-play-mode.768689/
The issue has been fixed in Unity 2020.1.0a23 and above