Class UndoCommand
Base class for undoable commands.
Inherited Members
Namespace: Unity.AppUI.Undo
Syntax
public abstract class UndoCommand
Constructors
UndoCommand(String)
Creates a new undo command.
Declaration
protected UndoCommand(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the command. |
Properties
id
The unique identifier of the command type.
Declaration
public abstract string id { get; }
Property Value
Type | Description |
---|---|
String |
isObsolete
Whether the command is obsolete.
Declaration
public bool isObsolete { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
memorySize
The memory size of the command.
Declaration
public abstract ulong memorySize { get; }
Property Value
Type | Description |
---|---|
UInt64 |
name
The name of the command.
Declaration
public string name { get; }
Property Value
Type | Description |
---|---|
String |
Methods
MergeWith(UndoCommand)
Merges the command with another command.
Declaration
public virtual bool MergeWith(UndoCommand command)
Parameters
Type | Name | Description |
---|---|---|
UndoCommand | command | The command to merge with. |
Returns
Type | Description |
---|---|
Boolean | Whether the command was merged. |
OnFlush()
Called when the command is flushed.
Declaration
public abstract void OnFlush()
Redo()
Redoes the command.
Declaration
public abstract void Redo()
Undo()
Undoes the command.
Declaration
public abstract void Undo()