Table of Contents

Class CoherenceSyncExtensions

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public static class CoherenceSyncExtensions
Inheritance
CoherenceSyncExtensions

Methods

GetInstance(CoherenceSync)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).

public static CoherenceSync GetInstance(this CoherenceSync sync)

Parameters

sync CoherenceSync

Returns

CoherenceSync

Returns an instance of the CoherenceSync prefab, if it was instantiated successfully.

GetInstance(CoherenceSync, CoherenceBridge, Vector3, Quaternion)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).

public static CoherenceSync GetInstance(this CoherenceSync sync, CoherenceBridge bridge, Vector3 position, Quaternion rotation)

Parameters

sync CoherenceSync
bridge CoherenceBridge

CoherenceBridge that will handle networking this prefab instance.

position Vector3

Position where the prefab will be instantiated.

rotation Quaternion

Rotation with which the prefab will be instantiated.

Returns

CoherenceSync

Returns an instance of the CoherenceSync prefab, if it was instantiated successfully.

GetInstance(CoherenceSync, Scene)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge).

public static CoherenceSync GetInstance(this CoherenceSync sync, Scene scene)

Parameters

sync CoherenceSync
scene Scene

Scene that has a CoherenceBridge to synchronize it with.

Returns

CoherenceSync

Returns an instance of the CoherenceSync prefab, if it was instantiated successfully.

GetInstance(CoherenceSync, Scene, Vector3, Quaternion)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge).

public static CoherenceSync GetInstance(this CoherenceSync sync, Scene scene, Vector3 position, Quaternion rotation)

Parameters

sync CoherenceSync
scene Scene

Scene that has a CoherenceBridge to synchronize it with.

position Vector3

Position where the prefab will be instantiated.

rotation Quaternion

Rotation with which the prefab will be instantiated.

Returns

CoherenceSync

Returns an instance of the CoherenceSync prefab, if it was instantiated successfully.

GetInstance(CoherenceSync, Vector3, Quaternion)

Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).

public static CoherenceSync GetInstance(this CoherenceSync sync, Vector3 position, Quaternion rotation)

Parameters

sync CoherenceSync
position Vector3

Position where the prefab will be instantiated.

rotation Quaternion

Rotation with which the prefab will be instantiated.

Returns

CoherenceSync

Returns an instance of the CoherenceSync prefab, if it was instantiated successfully.

ReleaseInstance(CoherenceSync)

Use this method to destroy a CoherenceSync instance that was fetched with the GetInstance methods.

public static void ReleaseInstance(this CoherenceSync sync)

Parameters

sync CoherenceSync