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
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
- Editor crashes on D3D12GetInterface when repeatedly enabling and disabling 256 text components
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0a23