Table of Contents

DefaultInstantiator

The default Instantiator responsible for replicating instantiation and destruction of networked objects on non-authoritative clients.

Remarks

Uses Instantiate to instantiate objects and UnityEngine.Object.Destroy(UnityEngine.Object) to destroy them.

If the object's Uniqueness has been set to No Duplicates, then the object will be set inactive instead of being destroyed when Destroy(ICoherenceSync) is called. This is to avoid local changes made to its state being lost in cases where the unique object was only temporarily set inactive on the authoritative client, and later becomes active again.

Constructors
DefaultInstantiator
Methods
Destroy

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

Instantiate

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

OnApplicationQuit

Called when the application exits.

OnUniqueObjectReplaced

Called when a unique object instance was replaced.

WarmUpInstantiator

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.