|
Name | Description |
---|---|
objectToUndo | The object(s) you want to save undo info for. |
name | The name of the action to undo. Think "Undo ...." in the main menu. |
Register the state of one or more objects so the user can later undo back to that state.
Note that only the actual objects passed as parameters are saved. For example, passing a game object will not save all its components or child objects. If you need to save the state of an entire game object, you can use EditorUtility.CollectDeepHierarchy on the game object to get all the objects that it contains and pass all those objects as objects to undo.
See Also: Undo.RegisterSceneUndo.