docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UndoCommand

    Base class for undoable commands.

    Inheritance
    object
    UndoCommand
    MacroCommand
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.Undo
    Assembly: Unity.AppUI.Undo.dll
    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
    bool

    memorySize

    The memory size of the command.

    Declaration
    public abstract ulong memorySize { get; }
    Property Value
    Type Description
    ulong

    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
    bool

    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()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)