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
- Asset Labels and Asset Bundle controls are not available and Asset Labels section Label is not visible when a Preview is present or collapsed
- Editor Perforce login fails when Perforce shows a license expiry warning
- Assertion failed error in HDRP builds when enabling STP via script
- FBX Resamples Curves incorrectly when importing FBX files
- ProBuilder GameObject Faces disappear when increasing the Sides Count value
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0a23