Undo.SetSnapshotTarget Manual     Reference     Scripting  
Scripting > Editor Classes > Undo
Undo.SetSnapshotTarget

static function SetSnapshotTarget (objectToUndo : Object, name : string) : void

static function SetSnapshotTarget (objectsToUndo : Object[], name : string) : void

Parameters

NameDescription
objectToUndo The object(s) you want to save undo info for.
name The name of the thing to undo. - Think "Undo ...." in the main menu.

Description

Set the objects modified by the GUI or Handles so they can undo properly.

This does not push an undo (the actual GUI or Handles are the ones who know when this is needed), but only informs the GUI or Handles what to call the operation on and where you end up applying it.