holoride
Search Results for

    Show / Hide Table of Contents

    Interface IContextProvider

    Contract of MonoBehaviours that act as context providers.

    Context providers offer a means of flexibly registering additional context types with systems that execute Pipelines, such as the Elastic Scene Generator.

    Workers may indicate that they require a specific context using the RequireGenerationContextAttribute. If a context provider is using the ContextProviderAttribute, it will may be automatically added to systems that execute Pipelines requiring the context they provide.

    Namespace: Holoride.ElasticSDK
    Assembly: Holoride.ElasticSDK.Runtime.dll
    Syntax
    public interface IContextProvider

    Properties

    IsDirty

    Gets a value indicating whether data provided by this context has changed and requires the Pipeline using this context needs to run again.

    Declaration
    bool IsDirty { get; }
    Property Value
    Type Description
    bool

    Methods

    ProvideContextAsync(GenerationSettings, GenerationContext, ISet<Type>, CancellationToken)

    Adds the IGenerationContext instances provided by this provider to the specified GenerationContext as an extension.

    To add IGenerationSettings instances to the passed GenerationSettings instance, use an ISettingsProvider.

    Declaration
    UniTask ProvideContextAsync(GenerationSettings settings, GenerationContext context, ISet<Type> requiredContextTypes, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    GenerationSettings settings

    The global generation settings used.

    GenerationContext context

    The context to add the provided extension contexts to.

    ISet<Type> requiredContextTypes

    The set of context types that workers in the pipeline the context is being built for require.

    CancellationToken cancellationToken

    The token to monitor for cancellation requests.

    Returns
    Type Description
    Cysharp.Threading.Tasks.UniTask

    Optional enumerator in case context initialization must run asynchronously.

    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint