Show / Hide Table of Contents

Class Undo

Inheritance
Object
Undo
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEditor
Assembly: UnityEditor.dll
Syntax
public class Undo

Fields

| Improve this Doc View Source

postprocessModifications

Declaration
public static Undo.PostprocessModifications postprocessModifications
Field Value
Type Description
Undo.PostprocessModifications
| Improve this Doc View Source

undoRedoPerformed

Declaration
public static Undo.UndoRedoCallback undoRedoPerformed
Field Value
Type Description
Undo.UndoRedoCallback
| Improve this Doc View Source

willFlushUndoRecord

Declaration
public static Undo.WillFlushUndoRecord willFlushUndoRecord
Field Value
Type Description
Undo.WillFlushUndoRecord

Methods

AddComponent(GameObject, Type)

Declaration
public static Component AddComponent(GameObject gameObject, Type type)
Parameters
Type Name Description
GameObject gameObject
Type type
Returns
Type Description
Component
| Improve this Doc View Source

AddComponent<T>(GameObject)

Declaration
public static T AddComponent<T>(GameObject gameObject)
    where T : Component
Parameters
Type Name Description
GameObject gameObject
Returns
Type Description
T
Type Parameters
Name Description
T

ClearAll()

Declaration
public static void ClearAll()
| Improve this Doc View Source

ClearSnapshotTarget()

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void ClearSnapshotTarget()

ClearUndo(Object)

Declaration
public static void ClearUndo(Object identifier)
Parameters
Type Name Description
Object identifier

CollapseUndoOperations(Int32)

Declaration
public static void CollapseUndoOperations(int groupIndex)
Parameters
Type Name Description
Int32 groupIndex
| Improve this Doc View Source

CreateSnapshot()

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void CreateSnapshot()
| Improve this Doc View Source

DestroyObjectImmediate(Object)

Declaration
public static void DestroyObjectImmediate(Object objectToUndo)
Parameters
Type Name Description
Object objectToUndo

FlushUndoRecordObjects()

Declaration
public static void FlushUndoRecordObjects()

GetCurrentGroup()

Declaration
public static int GetCurrentGroup()
Returns
Type Description
Int32

GetCurrentGroupName()

Declaration
public static string GetCurrentGroupName()
Returns
Type Description
String

IncrementCurrentGroup()

Declaration
public static void IncrementCurrentGroup()

MoveGameObjectToScene(GameObject, Scene, String)

Declaration
public static void MoveGameObjectToScene(GameObject go, Scene scene, string name)
Parameters
Type Name Description
GameObject go
Scene scene
String name

PerformRedo()

Declaration
public static void PerformRedo()

PerformUndo()

Declaration
public static void PerformUndo()

RecordObject(Object, String)

Declaration
public static void RecordObject(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

RecordObjects(Object[], String)

Declaration
public static void RecordObjects(Object[] objectsToUndo, string name)
Parameters
Type Name Description
Object[] objectsToUndo
String name
| Improve this Doc View Source

RegisterCompleteObjectUndo(Object, String)

Declaration
public static void RegisterCompleteObjectUndo(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

RegisterCompleteObjectUndo(Object[], String)

Declaration
public static void RegisterCompleteObjectUndo(Object[] objectsToUndo, string name)
Parameters
Type Name Description
Object[] objectsToUndo
String name

RegisterCreatedObjectUndo(Object, String)

Declaration
public static void RegisterCreatedObjectUndo(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

RegisterFullObjectHierarchyUndo(Object)

Declaration
[Obsolete("Use Undo.RegisterFullObjectHierarchyUndo(Object, string) instead")]
public static void RegisterFullObjectHierarchyUndo(Object objectToUndo)
Parameters
Type Name Description
Object objectToUndo

RegisterFullObjectHierarchyUndo(Object, String)

Declaration
public static void RegisterFullObjectHierarchyUndo(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

RegisterSceneUndo(String)

Declaration
[Obsolete("Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.")]
public static void RegisterSceneUndo(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

RegisterSnapshot()

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void RegisterSnapshot()
| Improve this Doc View Source

RegisterUndo(Object, String)

Declaration
[Obsolete("Use Undo.RegisterCompleteObjectUndo instead")]
public static void RegisterUndo(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

RegisterUndo(Object[], String)

Declaration
[Obsolete("Use Undo.RegisterCompleteObjectUndo instead")]
public static void RegisterUndo(Object[] objectsToUndo, string name)
Parameters
Type Name Description
Object[] objectsToUndo
String name
| Improve this Doc View Source

RestoreSnapshot()

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void RestoreSnapshot()

RevertAllDownToGroup(Int32)

Declaration
public static void RevertAllDownToGroup(int group)
Parameters
Type Name Description
Int32 group

RevertAllInCurrentGroup()

Declaration
public static void RevertAllInCurrentGroup()

SetCurrentGroupName(String)

Declaration
public static void SetCurrentGroupName(string name)
Parameters
Type Name Description
String name
| Improve this Doc View Source

SetSnapshotTarget(Object, String)

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void SetSnapshotTarget(Object objectToUndo, string name)
Parameters
Type Name Description
Object objectToUndo
String name
| Improve this Doc View Source

SetSnapshotTarget(Object[], String)

Declaration
[Obsolete("Use Undo.RecordObject instead")]
public static void SetSnapshotTarget(Object[] objectsToUndo, string name)
Parameters
Type Name Description
Object[] objectsToUndo
String name

SetTransformParent(Transform, Transform, String)

Declaration
public static void SetTransformParent(Transform transform, Transform newParent, string name)
Parameters
Type Name Description
Transform transform
Transform newParent
String name

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX