docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MacroCommand

    A macro command is a command that contains other commands.

    Inheritance
    object
    UndoCommand
    MacroCommand
    Inherited Members
    UndoCommand.name
    UndoCommand.isObsolete
    UndoCommand.MergeWith(UndoCommand)
    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 class MacroCommand : UndoCommand

    Constructors

    MacroCommand(string)

    Creates a new macro command.

    Declaration
    public MacroCommand(string name)
    Parameters
    Type Name Description
    string name

    The name of the macro command.

    Properties

    this[int]

    Get the command at the specified index.

    Declaration
    public UndoCommand this[int index] { get; }
    Parameters
    Type Name Description
    int index

    The index of the command.

    Property Value
    Type Description
    UndoCommand

    id

    The unique identifier of the macro command type.

    Declaration
    public override string id { get; }
    Property Value
    Type Description
    string
    Overrides
    UndoCommand.id

    memorySize

    The memory size of the macro command.

    Declaration
    public override ulong memorySize { get; }
    Property Value
    Type Description
    ulong
    Overrides
    UndoCommand.memorySize

    Methods

    Add(UndoCommand)

    Adds a command to the macro command.

    Declaration
    public void Add(UndoCommand command)
    Parameters
    Type Name Description
    UndoCommand command

    The command to add.

    OnFlush()

    This will call OnFlush() on all the commands contained in the macro command.

    Declaration
    public override void OnFlush()
    Overrides
    UndoCommand.OnFlush()

    Redo()

    Redoes the macro command.

    Declaration
    public override void Redo()
    Overrides
    UndoCommand.Redo()

    Undo()

    Undoes the macro command.

    Declaration
    public override void Undo()
    Overrides
    UndoCommand.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)