CloudOnce v2.7.5
Unified Game Services API
CloudOnce.Internal.CloudProviderBase< T > Class Template Referenceabstract

Base class for the Cloud service providers. More...

Inheritance diagram for CloudOnce.Internal.CloudProviderBase< T >:
[legend]
Collaboration diagram for CloudOnce.Internal.CloudProviderBase< T >:
[legend]

Public Member Functions

abstract void Initialize (bool activateCloudSave=true, bool autoSignIn=true, bool autoCloudLoad=true)
 Initializes the current cloud provider. More...
 
abstract void SignIn (bool autoCloudLoad=true, UnityAction< bool > callback=null)
 Signs in to the current cloud provider. More...
 
abstract void SignOut ()
 Signs out of the current cloud provider. More...
 
abstract void LoadUsers (string[] userIDs, Action< IUserProfile[]> callback)
 Load the user profiles associated with the given array of user IDs. More...
 
void Initialize (bool activateCloudSave=true, bool autoSignIn=true, bool autoCloudLoad=true)
 Initializes the current cloud provider. More...
 
void SignIn (bool autoCloudLoad=true, UnityAction< bool > callback=null)
 Signs in to the current cloud provider. More...
 
void SignOut ()
 Signs out of the current cloud provider. More...
 
void LoadUsers (string[] userIDs, Action< IUserProfile[]> callback)
 Load the user profiles associated with the given array of user IDs. More...
 

Protected Member Functions

virtual void OnAwake ()
 
virtual void OnOnDestroy ()
 

Properties

static T Instance [get]
 Makes sure only one instance of the type exists.
 
string ServiceName [get, protected set]
 Name of the currently used service, e.g. "Apple Game Center". More...
 
abstract string PlayerID [get]
 ID for currently signed in player. Will return an empty string if no player is signed in. More...
 
abstract string PlayerDisplayName [get]
 Display name for currently signed in player. Will return an empty string if no player is signed in. More...
 
abstract Texture2D PlayerImage [get]
 Profile picture for currently signed in player. Will return null if the user has no avatar, or it has not loaded yet. More...
 
abstract bool IsSignedIn [get]
 Whether or not the user is currently signed in. More...
 
abstract bool CloudSaveEnabled [get, set]
 Whether or not Cloud Save is enabled. Disabling Cloud Save will make Cloud.Storage.Save only save to disk. Can only be enabled if Cloud Save was initialized in Cloud.Initialize method. More...
 
abstract ICloudStorageProvider Storage [get, protected set]
 Interface for accessing Cloud Save on the current platform More...
 
- Properties inherited from CloudOnce.Internal.Providers.ICloudProvider
string ServiceName [get]
 Name of the currently used service, e.g. "Apple Game Center". More...
 
string PlayerID [get]
 ID for currently signed in player. Will return an empty string if no player is signed in. More...
 
string PlayerDisplayName [get]
 Display name for currently signed in player. Will return an empty string if no player is signed in. More...
 
Texture2D PlayerImage [get]
 Profile picture for currently signed in player. Will return null if the user has no avatar, or it has not loaded yet. More...
 
bool IsSignedIn [get]
 Whether or not the user is currently signed in. More...
 
bool CloudSaveEnabled [get, set]
 Whether or not Cloud Save is enabled. Disabling Cloud Save will make Cloud.Storage.Save only save to disk. Can only be enabled if Cloud Save was initialized in Cloud.Initialize method. More...
 
ICloudStorageProvider Storage [get]
 Interface for accessing cloud save on the current platform. More...
 

Detailed Description

Base class for the Cloud service providers.

Template Parameters
TType of singleton
Type Constraints
T :Component 

Member Function Documentation

◆ Initialize()

abstract void CloudOnce.Internal.CloudProviderBase< T >.Initialize ( bool  activateCloudSave = true,
bool  autoSignIn = true,
bool  autoCloudLoad = true 
)
pure virtual

Initializes the current cloud provider.

Parameters
activateCloudSaveWhether or not Cloud Saving should be activated.
autoSignInWhether or not SignIn will be called automatically once the cloud provider is initialized.
autoCloudLoadWhether or not cloud data should be loaded automatically if the user is successfully signed in. Ignored if Cloud Saving is deactivated or the user fails to sign in.

Implements CloudOnce.Internal.Providers.ICloudProvider.

Implemented in CloudOnce.Internal.Providers.iOSCloudProvider, CloudOnce.Internal.Providers.DummyProvider, CloudOnce.Internal.Providers.GooglePlayGamesCloudProvider, and CloudOnce.Internal.Providers.TestProvider.

◆ LoadUsers()

abstract void CloudOnce.Internal.CloudProviderBase< T >.LoadUsers ( string[]  userIDs,
Action< IUserProfile[]>  callback 
)
pure virtual

Load the user profiles associated with the given array of user IDs.

Parameters
userIDsThe users to retrieve profiles for.
callbackCallback to handle the user profiles.

Implements CloudOnce.Internal.Providers.ICloudProvider.

Implemented in CloudOnce.Internal.Providers.iOSCloudProvider, CloudOnce.Internal.Providers.DummyProvider, CloudOnce.Internal.Providers.GooglePlayGamesCloudProvider, and CloudOnce.Internal.Providers.TestProvider.

◆ SignIn()

abstract void CloudOnce.Internal.CloudProviderBase< T >.SignIn ( bool  autoCloudLoad = true,
UnityAction< bool >  callback = null 
)
pure virtual

Signs in to the current cloud provider.

Parameters
autoCloudLoadWhether or not cloud data should be loaded automatically if the user is successfully signed in. Ignored if Cloud Saving is deactivated or the user fails to sign in.
callbackThe callback to call when authentication finishes. It will be called with true if authentication was successful, false otherwise.

Implements CloudOnce.Internal.Providers.ICloudProvider.

Implemented in CloudOnce.Internal.Providers.iOSCloudProvider, CloudOnce.Internal.Providers.DummyProvider, CloudOnce.Internal.Providers.GooglePlayGamesCloudProvider, and CloudOnce.Internal.Providers.TestProvider.

◆ SignOut()

Property Documentation

◆ CloudSaveEnabled

abstract bool CloudOnce.Internal.CloudProviderBase< T >.CloudSaveEnabled
getset

Whether or not Cloud Save is enabled. Disabling Cloud Save will make Cloud.Storage.Save only save to disk. Can only be enabled if Cloud Save was initialized in Cloud.Initialize method.

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ IsSignedIn

abstract bool CloudOnce.Internal.CloudProviderBase< T >.IsSignedIn
get

Whether or not the user is currently signed in.

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ PlayerDisplayName

abstract string CloudOnce.Internal.CloudProviderBase< T >.PlayerDisplayName
get

Display name for currently signed in player. Will return an empty string if no player is signed in.

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ PlayerID

abstract string CloudOnce.Internal.CloudProviderBase< T >.PlayerID
get

ID for currently signed in player. Will return an empty string if no player is signed in.

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ PlayerImage

abstract Texture2D CloudOnce.Internal.CloudProviderBase< T >.PlayerImage
get

Profile picture for currently signed in player. Will return null if the user has no avatar, or it has not loaded yet.

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ ServiceName

string CloudOnce.Internal.CloudProviderBase< T >.ServiceName
getprotected set

Name of the currently used service, e.g. "Apple Game Center".

Implements CloudOnce.Internal.Providers.ICloudProvider.

◆ Storage

abstract ICloudStorageProvider CloudOnce.Internal.CloudProviderBase< T >.Storage
getprotected set

Interface for accessing Cloud Save on the current platform

Implements CloudOnce.Internal.Providers.ICloudProvider.


The documentation for this class was generated from the following file: