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
syncCoherenceSync
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
syncCoherenceSyncbridgeCoherenceBridgeCoherenceBridge that will handle networking this prefab instance.
positionVector3Position where the prefab will be instantiated.
rotationQuaternionRotation 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
syncCoherenceSyncsceneSceneScene 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
syncCoherenceSyncsceneSceneScene that has a CoherenceBridge to synchronize it with.
positionVector3Position where the prefab will be instantiated.
rotationQuaternionRotation 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
syncCoherenceSyncpositionVector3Position where the prefab will be instantiated.
rotationQuaternionRotation 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
syncCoherenceSync