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
Comments (1)
-
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
- [Android][iOS] The keyboard closes and re-opens when consecutive input fields are selected
- Complex Sub Graph connected to a Voronoi node is ignored when the shader gets applied as a Material
- Compute Shader property not set error when entering play mode with path tracing and PBR sky
- "WebGL Publish" detects WebGL module and allows building when it is installed without restarting the project
- Editor is non-responsive and flickers when multiple Water System instances are enabled
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0b14.4034