Undo.RegisterCreatedObjectUndo Manual     Reference     Scripting  
Scripting > Editor Classes > Undo
Undo.RegisterCreatedObjectUndo

static function RegisterCreatedObjectUndo (objectToUndo : Object, name : string) : void

Parameters

NameDescription
objectToUndo The Object to register undo operation on.
name The name of the action to undo. Think "Undo ...." in the main menu.

Description

Register the state of a Unity Object so the user can later undo back to that state.

Call this method before performing an operation that it should be possible to undo.

See Also: Undo.RegisterUndo.