docs.unity3d.com
    Show / Hide Table of Contents

    Class UndoCommand

    Base class for undoable commands.

    Inheritance
    Object
    UndoCommand
    MacroCommand
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023