IRealtimePrefabInstantiateDelegate
IRealtimePrefabInstantiateDelegate
A delegate used by Realtime / Room to instantiate and destroy prefab instances. This can be used to implement object pooling for realtime prefab instances.
Methods
InstantiateRealtimePrefab
GameObject InstantiateRealtimePrefab(GameObject prefab)
Called by Room to instantiate an instance of the given prefab. The default implementation calls UnityEngine.Object.Instantiate(prefab).
The prefab instance.
DestroyRealtimePrefab
void DestroyRealtimePrefab(GameObject prefabInstance)
Called by Room to destroy a realtime prefab instance. The default implementation calls UnityEngine.Object.Destroy(prefabInstance).
When implementing object pooling, use this method to return the prefab to the pool.