Skip to main content

IRealtimePrefabLoadDelegate

IRealtimePrefabLoadDelegate

A delegate used by Realtime / Room to load a prefab for instantiation. This can be used to redirect a prefabName in the datastore to another prefab or to use a different prefab loading API such as Addressables.

Methods

LoadRealtimePrefab

GameObject LoadRealtimePrefab(RealtimePrefabMetadata prefabMetadata)

Called by Room to load a prefab for a given prefab name. The default implementation calls Resources.Load<GameObject>(prefabName).

The realtime prefab to clone for instantiation.

  • prefabMetadata:The metadata stored in the datastore to reference this realtime prefab.