Search Issue Tracker

By Design

Votes

1

Found in

2018.4

2019.2.17f1

2020.2

Issue ID

1242049

Regression

No

Undo does not revert changes made to the Scriptableobject Subassets

Scripting

-

Steps to reproduce:
1. Open User-supplied project.
2. Select the "New Scriptable Object With Subassets" Scriptable Object in the Project window.
3. Press "Add Subasset".
4. Press Ctrl+z to undo.

Expected: the sub-asset disappears
Actual: the sub-asset remains

Reproduced in: 2018.4.23f1, 2019.2.21f1, 2019.3.13f1, 2020.1.0b8, 2020.2.0a10

  1. Resolution Note:

    Changes to asset hierarchy cannot be registered using the undo system. Undoing properties (RecordObject or RegisterCompleteObjectUndo) work as expected with the sub-assets but should be registered for the sub-assets and not their parent.

    Undo.RecordObject (or Undo.RegisterCompleteObjectUndo) work as expected for the "value" increments undo. They are not working in the attached example because they are registered with the parent rather than with the sub-assets themselves.

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.