Search Issue Tracker
Fixed in 2020.1.X
Votes
0
Found in
2018.4
2019.3.10f1
2019.4
2020.1
Issue ID
1259860
Regression
No
OnValidate() method is called every frame when setting the name of a Prefab which is selected in the Project window
How to reproduce:
1. Open the attached "1259860 repro" project
2. Select "ProblematicPrefab" Prefab from the Assets folder
Expected result: OnValidate() method isn't called every frame when the "TestScript" attempts to rename a Prefab
Actual result: OnValidate() method is called every frame as seen in the Console window
Reproducible with: 2018.4.24f1, 2019.4.3f1, 2020.1.0a22
Not reproducible with: 2020.1.0a23, 2020.1.0b14, 2020.2.0a16
Notes:
-On 2018.4 and 2019.4 streams "Assertion failed on expression 'gForceReimports->empty()'" error is thrown after deselecting the Prefab
-This issue only reproduces when the Prefab is selected in the Project window since it can't be renamed there
-On the affected versions, the OnValidate() method is called an infinite amount of times while on the not affected versions the OnValidate() method is only called twice
-If the 7th line of the "TestScript.cs" is commented out (name = "TestName";), the issue usually still reproduces until the Editor is restarted
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
- UI Text color is incorrect when text is rendered on SubMeshUI
- "Invalid SortingGroup index set in Renderer" errors when making many modifications in same frame
- Crash on GizmoBufferSizeHistory::GetBuffer() when opening a specific scene
- RenderTexture is not initialized when it is set as Material's Texture
- Branch node outputs a random value instead of a constant on the false conditon
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0a23