GetInstance
Methods
public CoherenceSync 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.
Returns
Type | Description |
---|---|
CoherenceSync | Returns an instance of the CoherenceSync prefab, if it was instantiated successfully. |
public CoherenceSync GetInstance(Scene 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.
Parameters
Type | Name | Description |
---|---|---|
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 CoherenceSync GetInstance(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). 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.
Parameters
Type | Name | Description |
---|---|---|
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 CoherenceSync GetInstance(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). 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.
Parameters
Type | Name | Description |
---|---|---|
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 CoherenceSync GetInstance(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). 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.
Parameters
Type | Name | Description |
---|---|---|
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. |