holoride
Search Results for

    Show / Hide Table of Contents

    Class ElasticObjectPoolManager

    Default object pooling implementation using the PooledObject component to mark prefabs for object pooling.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    ElasticObjectPoolManager
    Implements
    IPrefabInstantiationProvider
    IContextProvider
    Namespace: Holoride.ElasticSDK
    Assembly: Holoride.ElasticSDK.Runtime.dll
    Syntax
    [ContextProvider(typeof(PrefabInstantiationContext))]
    [HelpURL("http://localhost:8080/api/Holoride.ElasticSDK.ElasticObjectPoolManager.html")]
    public class ElasticObjectPoolManager : MonoBehaviour, IPrefabInstantiationProvider, IContextProvider

    Fields

    DefaultSettings

    Default pool settings that will be used if there was no specific settings asset for an individual pool specified.

    Declaration
    [Tooltip("Default pool settings that will be used if there was no specific settings asset for an individual pool specified.")]
    public ElasticObjectPoolDefaultSettings DefaultSettings
    Field Value
    Type Description
    ElasticObjectPoolDefaultSettings

    PoolSettings

    Declaration
    public List<ElasticObjectPoolSettings> PoolSettings
    Field Value
    Type Description
    List<ElasticObjectPoolSettings>

    Properties

    IsDirty

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

    Methods

    Clear(PooledObject)

    Manually clears (but does not destroy) a pool in the context dictionary.

    Declaration
    public void Clear(PooledObject poolKey)
    Parameters
    Type Name Description
    PooledObject poolKey

    The component key of the pool that should be cleared.

    ClearAll()

    Manually clears (but does not destroy) all pools in the context dictionary.

    Declaration
    public void ClearAll()

    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

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

    Declaration
    public UniTask ProvideContextAsync(GenerationSettings settings, GenerationContext context, ISet<Type> requiredContextTypes, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    GenerationSettings settings
    GenerationContext context
    ISet<Type> requiredContextTypes
    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

    IPrefabInstantiationProvider
    IContextProvider
    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint