Table of Contents

Class CoherenceSyncConfig

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public sealed 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

IsLinked

public bool IsLinked { get; }

Property Value

bool

Provider

public INetworkObjectProvider Provider { get; }

Property Value

INetworkObjectProvider

Sync

public CoherenceSync Sync { get; }

Property Value

CoherenceSync

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(ICoherenceBridge, 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(ICoherenceBridge bridge, Vector3 position, Quaternion rotation)

Parameters

bridge ICoherenceBridge

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(ICoherenceBridge, 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(ICoherenceBridge bridge, Vector3 position, Quaternion rotation, Action<CoherenceSync> onInstantiate)

Parameters

bridge ICoherenceBridge

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