Beamable SDK
|
This type defines the Client main entry point for the CloudSaving feature. More...
Public Member Functions | |
CloudSavingService (IPlatformService platform, PlatformRequester requester, CoroutineService coroutineService, IDependencyProvider provider) | |
Promise< Unit > | Init (int pollingIntervalSecs=10) |
The CloudSavingService must initialize before you should read or write any files from the LocalCloudDataFullPath. This method will start the initialization process. The isInitializing field value will be true when this method is running. More... | |
Promise< Unit > | ReinitializeUserData (int pollingIntervalSecs=10) |
This method will clear all local user data, and re-fetch everything from the Beamable server. The Init method will be called as part of this execution. More... | |
Promise< ManifestResponse > | EnsureRemoteManifest () |
You shouldn't need to call this method, because this will be called by the Init method This method will be marked as Obsolete in the future. More... | |
Public Member Functions inherited from Beamable.Api.PlatformSubscribable< ManifestResponse, ManifestResponse > | |
PlatformSubscription< Data > | Subscribe (Action< Data > callback) |
Subscribe to the callback to receive fresh data when available. More... | |
virtual PlatformSubscription< Data > | Subscribe (string scope, Action< Data > callback) |
Subscribe to the callback to receive fresh data when available. More... | |
Promise< Unit > | Refresh () |
Manually refresh the available data. More... | |
Data | GetLatest () |
Data | GetLatest (string scope) |
async Promise< ScopedRsp > | Fetch (string scope="") |
Send a request and get the latest state of the subscription. This method will not trigger existing subscriptions More... | |
Promise< Data > | GetCurrent (string scope="") |
Manually fetch the available data. If the server hasn't delivered a new update, this method will not return the absolute latest data unless you pass forceRefresh as true. More... | |
void | Notify (Data data) |
Manually notify observing scopes regarding the available data. More... | |
void | Notify (string scope, Data data) |
Manually notify observing scopes regarding the available data. More... | |
Public Attributes | |
Action< ManifestResponse > | UpdateReceived |
An event with a ManifestResponse parameter. This event triggers anytime the player's cloud files are updated by another device, or from the Portal. | |
Action< CloudSavingError > | OnError |
An event with a CloudSavingError parameter. This event triggers anytime there is an error in the CloudSavingService | |
bool | isInitializing = false |
The CloudSavingService needs to initialize before you should read or write files from the LocalCloudDataFullPath. This field is a guard that is true when the Init method is running, and false otherwise. | |
Protected Member Functions | |
override string | CreateRefreshUrl (string scope=null) |
override Promise< ManifestResponse > | ExecuteRequest (IBeamableRequester requester, string url) |
override void | OnRefresh (ManifestResponse data) |
Protected Member Functions inherited from Beamable.Api.PlatformSubscribable< ManifestResponse, ManifestResponse > | |
PlatformSubscribable (IDependencyProvider provider, string service, BeamableGetApiResource< ScopedRsp > getter=null) | |
virtual void | Reset () |
Promise< Unit > | Refresh (string scope) |
Manually refresh the available data. More... | |
virtual Promise | OnRefreshScope (string scope) |
virtual Promise< ScopedRsp > | ExecuteRequest (IBeamableRequester requester, string url) |
virtual void | OnRefresh (ScopedRsp data) |
virtual Promise | OnRefresh (ScopedRsp data, string[] scopes) |
void | ScheduleRefresh (long seconds, string scope) |
void | Unsubscribe (string scope, PlatformSubscription< Data > subscription) |
Properties | |
string | LocalCloudDataFullPath [get] |
The CloudSavingService will keep the files located at this file path backed up on Beamable servers. You should use this path as the base path for all file read and write operations. | |
Properties inherited from Beamable.Api.PlatformSubscribable< ManifestResponse, ManifestResponse > | |
bool | UsesHierarchyScopes [getprotected set] |
Additional Inherited Members | |
Protected Attributes inherited from Beamable.Api.PlatformSubscribable< ManifestResponse, ManifestResponse > | |
IBeamableRequester | requester |
IConnectivityService | connectivityService |
INotificationService | notificationService |
CoroutineService | coroutineService |
IUserContext | userContext |
BeamableGetApiResource< ScopedRsp > | getter |
readonly string | service |
This type defines the Client main entry point for the CloudSaving feature.
|
inlineprotectedvirtual |
Reimplemented from Beamable.Api.PlatformSubscribable< ManifestResponse, ManifestResponse >.
|
inline |
You shouldn't need to call this method, because this will be called by the Init method This method will be marked as Obsolete in the future.
Exception |
|
inline |
The CloudSavingService must initialize before you should read or write any files from the LocalCloudDataFullPath. This method will start the initialization process. The isInitializing field value will be true when this method is running.
pollingIntervalSecs | When a file is written to the LocalCloudDataFullPath path, it will be backed up on the Beamable server. The pollingIntervalSecs controls how often Beamable checks for new or updated files on the local device. |
|
inline |
This method will clear all local user data, and re-fetch everything from the Beamable server. The Init method will be called as part of this execution.
pollingIntervalSecs | When a file is written to the LocalCloudDataFullPath path, it will be backed up on the Beamable server. The pollingIntervalSecs controls how often Beamable checks for new or updated files on the local device. |