GetInstance
Methods
public static CoherenceSync GetInstance(this CoherenceSync sync)
Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).
Parameters
Type | Name | Description |
---|---|---|
CoherenceSync | sync |
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |
public static CoherenceSync GetInstance(this CoherenceSync sync, Scene scene)
Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge).
Parameters
Type | Name | Description |
---|---|---|
CoherenceSync | sync | |
Scene | scene | Scene that has a CoherenceBridge to synchronize it with. |
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |
public static CoherenceSync GetInstance(this CoherenceSync sync, Vector3 position, Quaternion rotation)
Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).
Parameters
Type | Name | Description |
---|---|---|
CoherenceSync | sync | |
Vector3 | position | Position where the prefab will be instantiated. |
Quaternion | rotation | Rotation with which the prefab will be instantiated. |
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |
public static CoherenceSync GetInstance(this CoherenceSync sync, Scene scene, Vector3 position, Quaternion rotation)
Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the selected scene if its networked with coherence (via a CoherenceBridge).
Parameters
Type | Name | Description |
---|---|---|
CoherenceSync | sync | |
Scene | scene | Scene that has a CoherenceBridge to synchronize it with. |
Vector3 | position | Position where the prefab will be instantiated. |
Quaternion | rotation | Rotation with which the prefab will be instantiated. |
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |
public static CoherenceSync GetInstance(this CoherenceSync sync, ICoherenceBridge bridge, Vector3 position, Quaternion rotation)
Use the CoherenceSynConfig instantiator to get a CoherenceSync instance in the active scene if its networked with coherence (via a CoherenceBridge).
Parameters
Type | Name | Description |
---|---|---|
CoherenceSync | sync | |
ICoherenceBridge | bridge | CoherenceBridge that will handle networking this prefab instance. |
Vector3 | position | Position where the prefab will be instantiated. |
Quaternion | rotation | Rotation with which the prefab will be instantiated. |
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |