APIs
Was this helpful?
Was this helpful?
You can access coherence Cloud features from the Unity SDK via the CloudService instance, which can be acquired via the Services property of a PlayerAccount object.
You can acquire a reference to a PlayerAccount first by logging in using CoherenceCloud (see Worlds and Rooms example code for an example), and then by using PlayerAccount.GetMainAsync.
Through the CloudService instance, you will be able to fetch the existing Worlds of your project, create new Rooms, delete and fetch existing Rooms, as well as access the various available Game Services.
In the subsections of this page, you will be able to find detailed usage examples of each feature from the CloudService API.
In the inspector of a CoherenceBridge instance, you will find two settings related with the coherence Cloud:
Player Account:
If set to Auto Login As Guest, the Cloud Service will automatically log in with the coherence Cloud using a guest player account.
If set to Main User, the Cloud Service will not log in to coherence automatically, but will connect with PlayerAccount.Main when you start logging in to coherence Cloud manually.
If set to None, the Cloud Service will not connect with coherence Cloud at all.
Cloud Unique ID: Uniquely identify the Cloud Service used by this CoherenceBridge. This allows multiple Coherence Bridges to auto login as different guests on the same device, which could be useful for local multiplayer. If no Cloud Unique ID is specified for a bridge, one will be autogenerated.