Search Issue Tracker

Won't Fix

Votes

0

Found in

5.3.2p2

Issue ID

770179

Regression

No

Undo.RecordObjects does not record array element values when called on an instance of a prefab

Scripting

-

Steps to reproduce:

1. Open attached project
2. Open scene "Scene"
3. In hierarchy, notice to game objects
4. Select first one and in its inspector click "Fill Arrays"
5. Do the same with the second one
6. Save scene and close unity
7. Reopen unity and project
8. Reopen scene "Scene" and inspect both of the game objects
9. Notice that in the GameObject that was linked to a prefab has all array elements reset to their default values, while in the other GameObject all values have been correctly saved

Reproduced with: 5.2.4p1, 5.3.2p3, 5.4.0b6

  1. Resolution Note:

    This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.

Comments (2)

  1. Rattaspi

    Mar 15, 2022 09:53

    For those who get here with the same issue:

    - Use Undo.RegisterCompleteObjectUndo(object, string) before making the changes to the object.
    - Use EditorUtility.SetDirty(object) just after all the changes are made.

  2. jynerso

    Jan 20, 2019 13:08

    Same issue on 2018.3.0f2

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.