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
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
- Referenced ScriptableObject field does not get updated and cannot be set to "None" when there are no Objects of that type
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0a23