特定のオブジェクトに対する変更点を Undo クラスによってもとに戻すことができます。
        Undo システムは最後に行われた変更を Undo スタックに保存します。
Undo クラスはイベントをベースとして自動的にまとめられます。例えば、 mouse down イベントは Undo グループを分割します。グループ化された Undo クラスは、単体の Undo として表示され、機能します。グループ化を手動で調整したい場合は Undo.IncrementCurrentGroup を使ってください。
デフォルトでは、 UI 上に表示される名称は、グループに属するアクションから選択されます。異なる種類のアクションがハードコードされた順番を利用します。手動で名称を設定する場合は、 Undo.SetCurrentGroupName を使ってください。
Undo operations store either per property or per object state. This way they scale well with any Scene size.
The most important operations are outlined below:
Modifying a single property:
Undo.RecordObject (myGameObject.transform, "Zero Transform Position");
myGameObject.transform.position = Vector3.zero;
Adding a component:
Undo.AddComponent<RigidBody>(myGameObject);
Creating a new game object:
var go = new GameObject();
Undo.RegisterCreatedObjectUndo (go, "Created go");
Destroying a game object or component:
Undo.DestroyObjectImmediate (myGameObject);
Changing transform parenting:
Undo.SetTransformParent (myGameObject.transform, newTransformParent, "Set new parent");
      
| postprocessModifications | Callback that is triggered whenever a new set of property modifications is created. | 
| undoRedoPerformed | Undo か Redo が実行された後、コールバックがトリガーされます。 | 
| willFlushUndoRecord | Undo システムがフラッシュを行う前に実行されます。 | 
| AddComponent | ゲームオブジェクトにコンポーネントをアタッチし、その操作の Undo を登録します。 | 
| ClearAll | Removes all undo and redo operations from respectively the undo and redo stacks. | 
| ClearUndo | Undo.RegisterCompleteObjectUndo を使って登録した identifier オブジェクトへの Undo 操作をすべて、Undo スタックから削除します。 | 
| CollapseUndoOperations | すべての Undo 操作を 1 つのステップにまとめます。 | 
| DestroyObjectImmediate | オブジェクトを破棄し、Undo 操作によって復元できるように記録します。 | 
| FlushUndoRecordObjects | RecordObject または ::ref:RecordObjects は Undo 可能なアクションとして記録されていることを確認してください。FlushUndoRecordObjects はマウスボタンを離し、通常、アクションをまとめるその他のイベントが終わった直後に自動的に行われるため、たいていは、わざわざ呼び出す必要はありません。 | 
| GetCurrentGroup | Unity が自動的に Undo 操作をグループ化したもので現在のグループインデックスを取得します | 
| GetCurrentGroupName | 現在の Undo グループの UI に表示される名前を取得します。 | 
| IncrementCurrentGroup | Unity が自動的に Undo 操作をグループ化したもので現在のグループインデックスを取得します | 
| MoveGameObjectToScene | Move a GameObject from its current Scene to a new Scene. It is required that the GameObject is at the root of its current Scene. | 
| PerformRedo | Redo 操作を行います。 | 
| PerformUndo | Undo 操作を行います。 | 
| RecordObject | RecordObject が呼び出された後の変更点を記録します | 
| RecordObjects | 1 回の呼び出しで複数の Undo 可能なオブジェクトを記録します。これは複数回 Undo.RecordObject を呼び出すのと同じです。 | 
| RegisterCompleteObjectUndo | Undo スタック上のオブジェクトの状態の複製を保存します。 | 
| RegisterCreatedObjectUndo | 新しくオブジェクトを生成するときの Undo 操作を登録します | 
| RegisterFullObjectHierarchyUndo | オブジェクトのヒエラルキーの状態を Undo スタック上にコピーします。 | 
| RegisterImporterUndo | Copies the state of the importer for the given asset path. | 
| RevertAllDownToGroup | 処理中の Redo 操作を保存せずに、グループインデックスまでのすべての Undo 操作を行います。 | 
| RevertAllInCurrentGroup | Undo 操作は実行されますが Redo 操作は行うことはできません | 
| SetCurrentGroupName | 現在の Undo グループに名前をつける。 | 
| SetTransformParent | 新しく Transform の親を設定し Undo 操作を記録します | 
| PostprocessModifications | Delegate used for postprocessModifications. | 
| UndoRedoCallback | undoRedoPerformed に使用されるデリゲート | 
| WillFlushUndoRecord | willFlushUndoRecord に使用されるデリゲート |