Class CoherenceSyncConfig
public class CoherenceSyncConfig : ScriptableObject
- Inheritance
-
CoherenceSyncConfig
Constructors
CoherenceSyncConfig()
public CoherenceSyncConfig()
Properties
EditorTarget
public Object EditorTarget { get; }
Property Value
ID
public string ID { get; }
Property Value
IncludeInSchema
public bool IncludeInSchema { get; set; }
Property Value
Instantiator
public INetworkObjectInstantiator Instantiator { get; }
Property Value
Provider
public INetworkObjectProvider Provider { get; }
Property Value
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
CoherenceBridgeCoherenceBridge that will handle networking this prefab instance.
position
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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
SceneScene 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
SceneScene that has a CoherenceBridge to synchronize it with.
position
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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
CoherenceBridgeCoherenceBridge that will handle networking this prefab instance.
position
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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
SceneScene 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
SceneScene that has a CoherenceBridge to synchronize it with.
position
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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
Vector3Position where the prefab will be instantiated.
rotation
QuaternionRotation 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