Undo.RegisterCreatedObjectUndo 注册创建物体撤销
static function RegisterCreatedObjectUndo (objectToUndo : Object, name : string) : void
Parameters参数
- objectToUndoThe Object to register undo operation on.
注册撤销操作的对象 - nameThe name of the action to undo. Think "Undo ...." in the main menu.
激活撤销的名称。想想一下菜单中的“Undo...”
Description描述
Register the state of a Unity Object so the user can later undo back to that state.
记录Unity物体的状态,为了以后执行撤消时恢复。
Call this method before performing an operation that it should be possible to undo.
执行操作之前调用这个方法应该,这样才能undo。
参见:Undo.RegisterUndo.