Class ContextBase | Platforms | 0.2.2-preview.10
docs.unity.cn
    Show / Hide Table of Contents

    Class ContextBase

    Inheritance
    Object
    ContextBase
    BuildContext
    Namespace: Unity.Build
    Syntax
    public abstract class ContextBase : IDisposable

    Properties

    BuildConfigurationAssetGUID

    The build configuration asset GUID.

    Declaration
    public string BuildConfigurationAssetGUID { get; }
    Property Value
    Type Description
    String

    The build configuration asset GUID.

    BuildConfigurationAssetPath

    The build configuration asset path.

    Declaration
    public string BuildConfigurationAssetPath { get; }
    Property Value
    Type Description
    String

    The build configuration asset path.

    BuildConfigurationName

    The build configuration name.

    Declaration
    public string BuildConfigurationName { get; }
    Property Value
    Type Description
    String

    The build configuration name.

    Values

    List of all values stored.

    Declaration
    public object[] Values { get; }
    Property Value
    Type Description
    Object[]

    Methods

    Dispose()

    Provides a mechanism for releasing unmanaged resources.

    Declaration
    public virtual void Dispose()

    GetOrCreateValue<T>()

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

    Declaration
    public T GetOrCreateValue<T>()
        where T : class
    Returns
    Type Description
    T

    The value or new instance of type T.

    Type Parameters
    Name Description
    T

    The value type.

    GetValue<T>()

    Get value of type T if found, otherwise null.

    Declaration
    public T GetValue<T>()
        where T : class
    Returns
    Type Description
    T

    The value of type T if found, otherwise null.

    Type Parameters
    Name Description
    T

    The value type.

    GetValueOrDefault<T>()

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

    Declaration
    public T GetValueOrDefault<T>()
        where T : class
    Returns
    Type Description
    T

    The value or new instance of type T.

    Type Parameters
    Name Description
    T

    The value type.

    HasValue<T>()

    Determine if the value of type T exists.

    Declaration
    public bool HasValue<T>()
        where T : class
    Returns
    Type Description
    Boolean

    true if value is found, false otherwise.

    Type Parameters
    Name Description
    T

    The value type.

    RemoveValue<T>()

    Remove value of type T from this build context.

    Declaration
    public bool RemoveValue<T>()
        where T : class
    Returns
    Type Description
    Boolean

    true if the value was removed, otherwise false.

    Type Parameters
    Name Description
    T

    The value type.

    SetValue<T>()

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

    Declaration
    public void SetValue<T>()
        where T : class
    Type Parameters
    Name Description
    T

    The value type.

    SetValue<T>(T)

    Set value of type T to this build context.

    Declaration
    public void SetValue<T>(T value)
        where T : class
    Parameters
    Type Name Description
    T value

    The value to set.

    Type Parameters
    Name Description
    T

    The value type.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX