Table of Contents

Interface INetworkObjectInstantiator

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public interface INetworkObjectInstantiator

Methods

Destroy(ICoherenceSync)

Called when coherence needs to destroy a prefab instance, when the related network entity is destroyed.

void Destroy(ICoherenceSync obj)

Parameters

obj ICoherenceSync

Instantiate(SpawnInfo)

Called when coherence needs to instantiate a CoherenceSync prefab, to link it to a new network entity.

ICoherenceSync Instantiate(SpawnInfo spawnInfo)

Parameters

spawnInfo SpawnInfo

Returns

ICoherenceSync

OnApplicationQuit()

Called when the application exits.

void OnApplicationQuit()

OnUniqueObjectReplaced(ICoherenceSync)

Called when a unique object instance was replaced.

void OnUniqueObjectReplaced(ICoherenceSync instance)

Parameters

instance ICoherenceSync

WarmUpInstantiator(CoherenceBridge, CoherenceSyncConfig, INetworkObjectProvider)

Called from the Start method of a given CoherenceBridge instance. The related Provider is also given to be able to load the Object if you wish to do so. Consider deactivating the prefab before instantiating it if you wish to initiate an Object Pool.

void WarmUpInstantiator(CoherenceBridge bridge, CoherenceSyncConfig config, INetworkObjectProvider assetLoader)

Parameters

bridge CoherenceBridge
config CoherenceSyncConfig
assetLoader INetworkObjectProvider