Search Issue Tracker
By Design
Votes
0
Found in
2020.3.44f1
2021.3.18f1
2022.2.6f1
2023.1.0b3
Issue ID
UUM-27293
Regression
No
[Prefab] Playmode clears Prefab script list data unless completely unpacked
Repro:
- Open scene Assets -> Scenes -> Alasdair -> AnimationTesting
- Click on LookManager in Hierarchy to view in Inspector.
- In the Loot Crate Manager component, expand the dropdowns to view the lists.
- Click ‘Load Resources as arrays’ and ‘FindAllLootCrates’ to populate the lists.
- Enter Play mode.
Expected Outcome: The Loot Crate Manager Component lists stay populated.
Actual Outcome: List items are all set to None/Missing.
Then:
- Right-click LootManager in Hierarchy -> Unpack Completely
- Repeat steps 2->5.
This time the expected outcome happens.
Reproducible on 2023.1.0b3, 2021.3.18f1, 2020.3.0f1 - marking as not regression.
Note:
- In 2020 the list is showing as empty instead of having missing objects, but the same issue with data disappearing occurs.
- Attached GIF demonstrating this issue.
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
After populating the lists of the Prefab Instance in "Load Resources as arrays" and "FindAllLootCrates", there is no call to PrefabUtility.RecordPrefabInstancePropertyModifications. Adding a call to this method will ensure that changes on the Prefab Instance are recorded and that the lists stay populated in Play Mode. Please see https://docs.unity3d.com/ScriptReference/PrefabUtility.RecordPrefabInstancePropertyModifications.html