Records any changes done on the object after the RecordObject function.
Undo.RecordObject (Selection.activeTransform, "Edit Transform"); Selection.activeTransform.position = Vector3(0, 0, 0);
no example available in C#
no example available in Boo
// Editor Script Side // Create a position Handle and make the target always look at the position handle. // This is an editor Script, this should go inside the Editor Folder. [CustomEditor (typeof(LookAtPoint))] class SnapshotTargetEx extends Editor { void OnSceneGUI () { LookAtPoint lookAtScript; EditorGUI.BeginChangeCheck (); Vector3 pos = Handles.PositionHandle(target.lookAtPoint, Quaternion.identity); if (EditorGUI.EndChangeCheck ()) { Undo.RecordObject ("Move point"); target.lookAtPoint = pos; // Make sure to call SetDirty otherwise the inspector will not know that the script properties were modified EditorUtility.SetDirty (target); } } }