Class CoherenceSyncExtensions
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
CoherenceSyncbridge
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(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
CoherenceSyncscene
SceneScene 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
CoherenceSyncscene
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(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
CoherenceSyncposition
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.
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