Class PrefabInstantiationContext
Context common to all prefab instantiation implementations, exposing them to IPipelineWorkers.
Inheritance
PrefabInstantiationContext
Assembly: Holoride.ElasticSDK.Runtime.dll
Syntax
public class PrefabInstantiationContext : IGenerationContext
Constructors
PrefabInstantiationContext(IPrefabInstantiationProvider)
Declaration
public PrefabInstantiationContext(IPrefabInstantiationProvider provider)
Parameters
Methods
Despawn(GameObject)
Declaration
public bool Despawn(GameObject instance)
Parameters
Returns
Init(GameObject, Action<GameObject>)
Declaration
[Obsolete("Use the async overload instead.")]
public IEnumerator Init(GameObject prefab, Action<GameObject> initAction = null)
Parameters
Returns
InitAsync(GameObject, Action<GameObject>, CancellationToken)
Declaration
public UniTask InitAsync(GameObject prefab, Action<GameObject> initAction = null, CancellationToken cancellationToken = default)
Parameters
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
Returns
Type |
Description |
Cysharp.Threading.Tasks.UniTask<T><(bool Success, GameObject Result)> |
|
Implements