Table of Contents

Class CoherenceSyncConfig

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public class CoherenceSyncConfig : ScriptableObject
Inheritance
CoherenceSyncConfig

Constructors

CoherenceSyncConfig()

public CoherenceSyncConfig()

Properties

EditorTarget

public Object EditorTarget { get; }

Property Value

Object

ID

public string ID { get; }

Property Value

string

IncludeInSchema

public bool IncludeInSchema { get; set; }

Property Value

bool

Instantiator

public INetworkObjectInstantiator Instantiator { get; }

Property Value

INetworkObjectInstantiator

Provider

public INetworkObjectProvider Provider { get; }

Property Value

INetworkObjectProvider

Methods

GetInstance()

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 is loaded via an Object Provider that has a synchronous implementation. Use with care when loading the prefab can incur into heavy performance penalties if the prefab is loaded through an Asset Bundle.

public CoherenceSync GetInstance()

Returns

CoherenceSync

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

GetInstance(CoherenceBridge, Vector3, Quaternion)

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 is loaded via an Object Provider that has a synchronous implementation. Use with care when loading the prefab can incur into heavy performance penalties if the prefab is loaded through an Asset Bundle.

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

Parameters

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(Scene)

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 is loaded via an Object Provider that has a synchronous implementation. Use with care when loading the prefab can incur into heavy performance penalties if the prefab is loaded through an Asset Bundle.

public CoherenceSync GetInstance(Scene scene)

Parameters

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(Scene, Vector3, Quaternion)

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 is loaded via an Object Provider that has a synchronous implementation. Use with care when loading the prefab can incur into heavy performance penalties if the prefab is loaded through an Asset Bundle.

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

Parameters

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(Vector3, Quaternion)

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 is loaded via an Object Provider that has a synchronous implementation. Use with care when loading the prefab can incur into heavy performance penalties if the prefab is loaded through an Asset Bundle.

public CoherenceSync GetInstance(Vector3 position, Quaternion rotation)

Parameters

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.

GetInstanceAsync(CoherenceBridge, Vector3, Quaternion, Action<CoherenceSync>)

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.

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

Parameters

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.

onInstantiate Action<CoherenceSync>

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

GetInstanceAsync(Action<CoherenceSync>)

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.

public void GetInstanceAsync(Action<CoherenceSync> onInstantiate)

Parameters

onInstantiate Action<CoherenceSync>

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

GetInstanceAsync(Scene, Action<CoherenceSync>)

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.

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

Parameters

scene Scene

Scene that has a CoherenceBridge to synchronize it with.

onInstantiate Action<CoherenceSync>

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

GetInstanceAsync(Scene, Vector3, Quaternion, Action<CoherenceSync>)

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.

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

Parameters

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.

onInstantiate Action<CoherenceSync>

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

GetInstanceAsync(Vector3, Quaternion, Action<CoherenceSync>)

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.

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

Parameters

position Vector3

Position where the prefab will be instantiated.

rotation Quaternion

Rotation with which the prefab will be instantiated.

onInstantiate Action<CoherenceSync>

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

ReleaseInstance(CoherenceSync)

Use this method to destroy CoherenceSync instances that have been loaded via the Instantiate methods of CoherenceSyncConfigManager.

public void ReleaseInstance(CoherenceSync instance)

Parameters

instance CoherenceSync