Search Issue Tracker
By Design
By Design in 6000.0.X
Votes
0
Found in
2022.3.50f1
6000.0.22f1
Issue ID
UUM-84286
Regression
No
Prefab's component value gets reset when entering Play Mode
Steps to reproduce:
1. Open the attached “IN-86001.zip” project
2. Open the “SampleScene”
3. Select the “GameObject” in the Hierarchy
4. Reset the “Component_A” script in the Inspector Window
5. Make sure that “Component_A” and “Component_B” booleans are both set to true
6. Enter Play Mode
7. Observe the “Component_A” and “Component_B” boolean values
Expected result: Both boolean values stay true
Actual result: “Component_B” is set to false, while “Component_A” stays the same
Reproducible in: 2022.3.50f1, 6000.0.22f1, 2021.3.44f1
Reproducible on: Windows 11
Not reproducible on: No other environment tested
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
We have reviewed the issue carefully and can confirm that this is not a bug.
In this case there should be a call to 'RecordPrefabInstancePropertyModifications'. Call this method after making modifications to an instance of a Prefab to record those changes in the instance. If this method is not called, changes made to the instance are lost.
The documentation is available here: https://docs.unity3d.com/ScriptReference/PrefabUtility.RecordPrefabInstancePropertyModifications.html
Resolution Note (6000.0.X):
We have reviewed the issue carefully and can confirm that this is not a bug.
In this case there should be a call to 'RecordPrefabInstancePropertyModifications'. Call this method after making modifications to an instance of a Prefab to record those changes in the instance. If this method is not called, changes made to the instance are lost.
The documentation is available here: https://docs.unity3d.com/ScriptReference/PrefabUtility.RecordPrefabInstancePropertyModifications.html