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
- Unapplied changes on the "MainPanel" GameObject in the "BlobShadow" of URP Samples
- [Vulkan][Android] The Player crashes on devices with SP9863A chipset
- "Output properties of this Camera do not match the output properties" warning is shown In the "SplitScreen" scene of URP Samples
- "Gun" Prefab used in "MixedFOV" scene of URP Samples has unapplied changes
- "FirstPersonController uses the legacy input system" message is logged when entering the Play Mode in "MixedFOV" scene of URP Samples
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0a23