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
| Type |
Name |
Description |
| GameObject |
instance |
|
Returns
Init(GameObject, Action<GameObject>)
Declaration
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 = null)
Parameters
| Type |
Name |
Description |
| GameObject |
prefab |
|
| Action<><GameObject> |
initAction |
|
| CancellationToken |
cancellationToken |
|
Returns
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 = null)
Parameters
| Type |
Name |
Description |
| GameObject |
prefab |
|
| Vector3 |
position |
|
| Quaternion |
rotation |
|
| Vector3 |
scale |
|
| Func<, ><GameObject, UniTask> |
preSpawnAction |
|
| CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| UniTask<><(bool Success, GameObject Result)> |
|
Implements