TryGetBridge
Methods
public static bool TryGetBridge(int sceneHandle, out CoherenceBridge bridge)
Get a reference to a registered CoherenceBridge.
Parameters
Type | Name | Description |
---|---|---|
int | sceneHandle | The handle of the scene associated with the bridge. |
CoherenceBridge | bridge | The bridge reference. |
Returns
Type | Description |
---|---|
bool | true if the registered reference could be fetched. false otherwise. |
See Also
public static bool TryGetBridge(PlayerAccount playerAccount, out CoherenceBridge bridge)
Get a reference to a CoherenceBridge connected to coherence Cloud
using a particular playerAccount
.
Parameters
Type | Name | Description |
---|---|---|
PlayerAccount | playerAccount | The PlayerAccount whose cloud services the bridge is using. |
CoherenceBridge | bridge | When this method returns, contains the bridge that is using the cloud services of the |
Returns
Type | Description |
---|---|
bool | true if a bridge that is connected with the player account was found; otherwise, false. |
Remarks
When a CoherenceBridge's 'Player Account' is set to 'Auto Login As Guest', it will be connected with the logged-in guest player account.
When a CoherenceBridge's 'Player Account' is set to 'Main', it will be connected with main player account after an operation to log into coherence Cloud has been initiated anywhere in the codebase.
When a CoherenceBridge's 'Player Account' is set to 'None', it can be connected with a PlayerAccount by assigning its cloud services to the CoherenceBridge.CloudService property.
public static bool TryGetBridge(Scene scene, out CoherenceBridge bridge)
Get a reference to a registered CoherenceBridge.
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | The scene associated with the bridge. |
CoherenceBridge | bridge | The bridge reference. |
Returns
Type | Description |
---|---|
bool | true if the registered reference could be fetched. false otherwise. |
public static bool TryGetBridge<T>(Scene scene, CoherenceBridgeResolver<T> resolver, T component, out CoherenceBridge bridge) where T : MonoBehaviour
Get a reference to a registered CoherenceBridge.
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | The scene associated with the bridge. |
CoherenceBridgeResolver<T> | resolver | The resolver to use. Use null to skip. |
T | component | The component to send through the resolver. |
CoherenceBridge | bridge | The bridge reference. |
Returns
Type | Description |
---|---|
bool | true if the registered reference could be fetched. false otherwise. |
Type Parameters
Name | Description |
---|---|
T |