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:

  1. Open scene Assets -> Scenes -> Alasdair -> AnimationTesting
  2. Click on LookManager in Hierarchy to view in Inspector.
  3. In the Loot Crate Manager component, expand the dropdowns to view the lists.
  4. Click ‘Load Resources as arrays’ and ‘FindAllLootCrates’ to populate the lists.
  5. Enter Play mode.

 

Expected Outcome: The Loot Crate Manager Component lists stay populated.

Actual Outcome: List items are all set to None/Missing.

Then:

  1. Right-click LootManager in Hierarchy -> Unpack Completely
  2. 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.
  1. 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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.