docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ContextBase

    Inheritance
    object
    ContextBase
    BuildContext
    CleanContext
    RunContext
    Implements
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Build
    Assembly: solution.dll
    Syntax
    public abstract class ContextBase : IDisposable

    Properties

    Name Description
    BuildConfigurationAssetGUID

    The build configuration asset GUID.

    BuildConfigurationAssetPath

    The build configuration asset path.

    BuildConfigurationName

    The build configuration name.

    Values

    List of all values stored.

    Methods

    Name Description
    Dispose()

    Provides a mechanism for releasing unmanaged resources.

    GetComponentOrDefault(Type)

    Get the value of a component type if found. Otherwise an instance created using TypeConstruction utility. The container is not modified. Throws if component type is not in UsedComponents list.

    GetComponentOrDefault<T>()

    Get the value of a component type if found. Otherwise an instance created using TypeConstruction utility. The container is not modified. Throws if component type is not in UsedComponents list.

    GetComponentTypes()

    Get a flatten list of all component types from this container and its dependencies. Throws if a component type is not in UsedComponents list.

    GetComponents()

    Get a flatten list of all components recursively from this container and its dependencies. Throws if a component type is not in UsedComponents list.

    GetComponents(Type)

    Get a flatten list of all components recursively from this container and its dependencies, that matches Type. Throws if component type is not in UsedComponents list.

    GetComponents<T>()

    Get a flatten list of all components recursively from this container and its dependencies, that matches T. Throws if component type is not in UsedComponents list.

    GetLastBuildArtifact(Type)

    Get the value of the first build artifact that is assignable to type Type.

    GetLastBuildArtifact<T>()

    Get the value of the first build artifact that is assignable to type T.

    GetLastBuildResult()

    Get the last build result for this build configuration.

    GetOrCreateValue<T>()

    Get value of type T if found. Otherwise a new instance of type T constructed using TypeConstruction utility and then set on this build context.

    GetOutputBuildDirectory()

    Get the output build directory override used in this build context. The output build directory can be overridden using a OutputBuildDirectory component.

    GetValueOrDefault<T>()

    Get value of type T if found. Otherwise a new instance of type T constructed using TypeConstruction utility. The build context is not modified.

    GetValue<T>()

    Get value of type T if found, otherwise null.

    HasComponent(Type)

    Determine if a component type is stored in this container or its dependencies. Throws if component type is not in UsedComponents list.

    HasComponent<T>()

    Determine if a component type is stored in this container or its dependencies. Throws if component type is not in UsedComponents list.

    HasValue<T>()

    Determine if the value of type T exists.

    IsComponentInherited(Type)

    Determine if a component type is inherited from a dependency. Throws if component type is not in UsedComponents list.

    IsComponentInherited<T>()

    Determine if a component type is inherited from a dependency. Throws if component type is not in UsedComponents list.

    IsComponentOverridden(Type)

    Determine if a component type overrides a dependency. Throws if component type is not in UsedComponents list.

    IsComponentOverridden<T>()

    Determine if a component type overrides a dependency. Throws if component type is not in UsedComponents list.

    RemoveComponent(Type)

    Remove a component type from this context. NOTE: The build configuration asset is not modified.

    RemoveComponent<T>()

    Remove all T components from this container.

    RemoveValue<T>()

    Remove value of type T from this build context.

    SetComponent(Type)

    Set the value of a component type on this context using an instance created using TypeConstruction utility. NOTE: The build configuration asset is not modified.

    SetComponent(Type, IBuildComponent)

    Set the value of a component type on this context. NOTE: The build configuration asset is not modified.

    SetComponent<T>()

    Set the value of a component type on this context using an instance created using TypeConstruction utility. NOTE: The build configuration asset is not modified.

    SetComponent<T>(T)

    Set the value of a component type on this context. NOTE: The build configuration asset is not modified.

    SetValue<T>()

    Set value of type T to this build context to its default using TypeConstruction utility.

    SetValue<T>(T)

    Set value of type T to this build context.

    TryGetComponent(Type, out IBuildComponent)

    Try to get the value of a component type. Throws if component type is not in UsedComponents list.

    TryGetComponent<T>(out T)

    Try to get the value of a component type. Throws if component type is not in UsedComponents list.

    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)