Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2020.1.X
Votes
0
Found in
2018.4
2019.3
2019.3.10f1
2020.1.0a8
2020.2
Issue ID
1239807
Regression
Yes
CustomEditor OnEnable() called every frame if enabled Object is selected from Project Window
Reproduction steps:
1. Create a new project
2. Import "MyCollider.cs"
3. Create a Prefab and attach the "MyCollider.cs" Script to it
4. Select the Prefab in Project Window and inspect the Console
Expected result: OnEnable is called once
Actual result: OnEnable is called every frame when the Prefab is selected
Reproducible with: 2018.4.22f1, 2019.3.14f1, 2020.1.0a8, 2020.1.0b8, 2020.2.0a10
Not reproducible with 2017.4.40f1, 2019.2.21f1, 2019.3.0b1, 2020.1.0a7
Notes:
1. Sometimes (earlier versions) OnEnable() only gets called when Object is selected in Hierarchy and doesn't work in the Project Window which makes it impossible to reproduce the issue since it only reproduces in Project window
2. The issue has been backported to 2018.4, 2019.3
3. Video of the issue is attached
-
Elringus
Jul 10, 2020 10:02
Still reproduced in Unity 2019.4.
My bug report (Case 1260866) with a repro project on Unity 2019.4.2f1 has been closed as a dublicate of this one, but the same (or similar) issue happens there as well. Please check it.
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 (fix version 2020.1):
Fixed in 2020.1.0b14.4034