Search Issue Tracker
Active
Votes
0
Found in
2021.3.44f1
2022.3.50f1
6000.0.23f1
Issue ID
UUM-84103
Regression
No
Components of a Prefab instance lose their values that are updated with the Reset() method when entering Play Mode
How to reproduce:
1. Create and open a new project
2. Create an Empty GameObject
3. Attach “ComponentA.cs” and “ComponentB.cs” scripts to the GameObject
4. Delete all strings and uncheck checkboxes in both Components of the Empty GameObject in the Hierarchy
5. Drag the GameObject to the Project tab (to create a prefab of the GameObject)
6. Select the Empty GameObject in the Hierarchy
7. Click the “Reset“ button in the Context menu of the ComponentA in the Inspector
8. Enter Play Mode
9. Observe the Inspector
Expected results: Both Components retain their values before entering Play Mode
Actual results: ComponentB forgets its values and sets its values to what they were before resetting them in the Inspector and ComponentA retains its values they were after resetting them
Reproducible in: 2021.3.44f1, 2022.3.50f1, 6000.0.23f1
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
- When the ComponentA is reset, it sets all checkboxes to true and the string fields to “I’m set to true“ of both Components
- If, for example, a checkbox is not unchecked in ComponentB before resetting ComponentA, after entering Play Mode it will still be set to true
- This does not work with non-prefabed GameObjects
- It’s likely, that the fields are reset only visually, as the labels of the ComponentB fields do not become bolded (indicating unsaved changes)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- EditorGUILayout.LabelField displays black text when the "EditorStyles.whiteBoldLabel" parameter is passed in
- The UI Toolkit TreeView Items get clipped when resizing the Game view window when Scale with Screen Size is set as the Scale Mode in the Panel Settings
- Components of a Prefab instance lose their values that are updated with the Reset() method when entering Play Mode
- UI Builder Broken Direct Asset Reference Overrides
- Universal 3D Sample project template takes a very long time to build.
Add comment