Lets you register undo operations on specific objects you are about to perform changes on.
Undo.RecordObject (myGameObject.light, "Set Light Range"); myGameObject.light.range = 5;
Undo.AddComponent<RigidBody> (myGameObject);
var go = new GameObject (); Undo.RegisterCreatedObjectUndo (go, "Created go");
Undo.DestroyObjectImmediate (myGameObject);
Undo.SetTransformParent (myGameObject.transform, newTransformParent);
postprocessModifications | |
---|---|
undoRedoPerformed |
Undo |
---|
AddComponent | |
---|---|
ClearUndo | Removes aall Undo operation for the identifier object registered using Undo.RegisterCompleteObjectUndo from the undo stack. |
CollapseUndoOperations | Collapses all undo operation up to group index together into one step. |
DestroyObjectImmediate | Destroys the object and records an undo operation so that it can be recreated. |
FlushUndoRecordObjects | |
GetCurrentGroup | Unity automatically groups undo operations by the current group index. |
IncrementCurrentGroup | Unity automatically groups undo operations by the current group index. |
PerformRedo | Perform an Redo operation. |
PerformUndo | Perform an Redo operation. |
RecordObject | Records any changes done on the object after the RecordObject function. |
RecordObjects | Records multiple undoable objects in a single call. This is the same as calling Undo.RecordObject multiple times. |
RegisterCompleteObjectUndo | |
RegisterCreatedObjectUndo | Register an undo operations for a newly created object. |
RegisterFullObjectHierarchyUndo | |
RevertAllDownToGroup | Performs all undo operations up to the group index without storing a redo operation in the process. |
RevertAllInCurrentGroup | Performs the last undo operation but does not record a redo operation. |
SetTransformParent | Sets the parent of transform to the new parent and records an undo operation. |