docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Command<T>

    Represents a command to execute on a deployment item.

    Inheritance
    object
    Command
    Command<T>
    Inherited Members
    Command.Name
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.DeploymentApi.Editor
    Assembly: Unity.Services.DeploymentApi.dll
    Syntax
    public abstract class Command<T> : Command where T : IDeploymentItem
    Type Parameters
    Name Description
    T

    Deployment Item Type

    Methods

    ExecuteAsync(IEnumerable<IDeploymentItem>, CancellationToken)

    Defines the method to be called when a command is invoked.

    Declaration
    public override sealed Task ExecuteAsync(IEnumerable<IDeploymentItem> items, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IEnumerable<IDeploymentItem> items

    The target items of the invocation

    CancellationToken cancellationToken

    Cancellation token to cancel command invocation

    Returns
    Type Description
    Task

    A task representing the invocation result

    Overrides
    Command.ExecuteAsync(IEnumerable<IDeploymentItem>, CancellationToken)

    ExecuteAsync(IEnumerable<T>, CancellationToken)

    Defines the method to be called when the command is invoked.

    Declaration
    public abstract Task ExecuteAsync(IEnumerable<T> items, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IEnumerable<T> items

    The target items of the invocation.

    CancellationToken cancellationToken

    Cancellation token to cancel command invocation.

    Returns
    Type Description
    Task

    A task representing invocation result

    IsEnabled(IEnumerable<IDeploymentItem>)

    The method to determine whether the command is enabled in the context menu.

    Declaration
    public override sealed bool IsEnabled(IEnumerable<IDeploymentItem> items)
    Parameters
    Type Name Description
    IEnumerable<IDeploymentItem> items

    The target items of the invocation

    Returns
    Type Description
    bool

    A bool representing the enablement status

    Overrides
    Command.IsEnabled(IEnumerable<IDeploymentItem>)

    IsEnabled(IEnumerable<T>)

    Defines the method to be called when a command is invoked.

    Declaration
    public virtual bool IsEnabled(IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items

    The target items of the invocation.

    Returns
    Type Description
    bool

    A task representing the invocation result.

    IsVisible(IEnumerable<IDeploymentItem>)

    The method to determine whether the command is visible in the context menu.

    Declaration
    public override sealed bool IsVisible(IEnumerable<IDeploymentItem> items)
    Parameters
    Type Name Description
    IEnumerable<IDeploymentItem> items

    The target items of the invocation

    Returns
    Type Description
    bool

    A bool representing the visibility status

    Overrides
    Command.IsVisible(IEnumerable<IDeploymentItem>)

    IsVisible(IEnumerable<T>)

    The method to determine whether the command is visible in the context menu.

    Declaration
    public virtual bool IsVisible(IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items

    The target items of the invocation.

    Returns
    Type Description
    bool

    A bool representing the visibility status.

    In This Article
    Back to top
    Copyright © 2025 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)