holoride
Search Results for

    Show / Hide Table of Contents

    Class PrefabInstantiationContext

    Context common to all prefab instantiation implementations, exposing them to IPipelineWorkers.

    Inheritance
    object
    PrefabInstantiationContext
    Implements
    IGenerationContext
    Namespace: Holoride.ElasticSDK
    Assembly: Holoride.ElasticSDK.Runtime.dll
    Syntax
    public class PrefabInstantiationContext : IGenerationContext

    Constructors

    PrefabInstantiationContext(IPrefabInstantiationProvider)

    Declaration
    public PrefabInstantiationContext(IPrefabInstantiationProvider provider)
    Parameters
    Type Name Description
    IPrefabInstantiationProvider provider

    Methods

    Despawn(GameObject)

    Declaration
    public bool Despawn(GameObject instance)
    Parameters
    Type Name Description
    GameObject instance
    Returns
    Type Description
    bool

    Init(GameObject, Action<GameObject>)

    Declaration
    [Obsolete("Use the async overload instead.")]
    public IEnumerator Init(GameObject prefab, Action<GameObject> initAction = null)
    Parameters
    Type Name Description
    GameObject prefab
    Action<GameObject> initAction
    Returns
    Type Description
    IEnumerator

    InitAsync(GameObject, Action<GameObject>, CancellationToken)

    Declaration
    public UniTask InitAsync(GameObject prefab, Action<GameObject> initAction = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    GameObject prefab
    Action<GameObject> initAction
    CancellationToken cancellationToken
    Returns
    Type Description
    Cysharp.Threading.Tasks.UniTask

    Spawn(GameObject, Vector3, Quaternion, Vector3, Func<GameObject, UniTask>, CancellationToken)

    Declaration
    public UniTask<(bool Success, GameObject Result)> Spawn(GameObject prefab, Vector3 position, Quaternion rotation, Vector3 scale, Func<GameObject, UniTask> preSpawnAction = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    GameObject prefab
    Vector3 position
    Quaternion rotation
    Vector3 scale
    Func<GameObject, Cysharp.Threading.Tasks.UniTask> preSpawnAction
    CancellationToken cancellationToken
    Returns
    Type Description
    Cysharp.Threading.Tasks.UniTask<T><(bool Success, GameObject Result)>

    Implements

    IGenerationContext
    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint