Table of Contents

GetInstanceAsync

Methods
public void GetInstanceAsync(Action<CoherenceSync> onInstantiate)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge). Use this method when the prefab needs to be loaded asynchronously through Addressables or an Asset Bundle.

Parameters
Type Name Description
Action<CoherenceSync> onInstantiate

Callback that will be invoked with the result of the instantiation.

public void GetInstanceAsync(Scene scene, Action<CoherenceSync> onInstantiate)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge). Use this method when the prefab needs to be loaded asynchronously through Addressables or an Asset Bundle.

Parameters
Type Name Description
Scene scene

Scene that has a CoherenceBridge to synchronize it with.

Action<CoherenceSync> onInstantiate

Callback that will be invoked with the result of the instantiation.

public void GetInstanceAsync(Vector3 position, Quaternion rotation, Action<CoherenceSync> onInstantiate)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge). Use this method when the prefab needs to be loaded asynchronously through Addressables or an Asset Bundle.

Parameters
Type Name Description
Vector3 position

Position where the prefab will be instantiated.

Quaternion rotation

Rotation with which the prefab will be instantiated.

Action<CoherenceSync> onInstantiate

Callback that will be invoked with the result of the instantiation.

public void GetInstanceAsync(Scene scene, Vector3 position, Quaternion rotation, Action<CoherenceSync> onInstantiate)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge). Use this method when the prefab needs to be loaded asynchronously through Addressables or an Asset Bundle.

Parameters
Type Name Description
Scene scene

Scene that has a CoherenceBridge to synchronize it with.

Vector3 position

Position where the prefab will be instantiated.

Quaternion rotation

Rotation with which the prefab will be instantiated.

Action<CoherenceSync> onInstantiate

Callback that will be invoked with the result of the instantiation.

public void GetInstanceAsync(ICoherenceBridge bridge, Vector3 position, Quaternion rotation, Action<CoherenceSync> onInstantiate)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the scene that the CoherenceBridge is attached to. Use this method when the prefab needs to be loaded through Addressables or an Asset Bundle.

Parameters
Type Name Description
ICoherenceBridge bridge

CoherenceBridge that will handle networking this prefab instance.

Vector3 position

Position where the prefab will be instantiated.

Quaternion rotation

Rotation with which the prefab will be instantiated.

Action<CoherenceSync> onInstantiate

Callback that will be invoked with the result of the instantiation.