Beamable SDK
|
This type defines the Client main entry point for the Content feature. More...
Public Member Functions | |
ContentService (IDependencyProvider provider, IBeamableFilesystemAccessor filesystemAccessor, ContentParameterProvider config) | |
Promise< IContentObject > | GetContent (string contentId, string manifestID="") |
Get the content data for a requested content id. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache. More... | |
Promise< IContentObject > | GetContent (string contentId, Type contentType, string manifestID="") |
Get the content data for a requested content id. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache. More... | |
Promise< IContentObject > | GetContent (IContentRef reference, string manifestID="") |
Get the content data for a requested IContentRef. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache. More... | |
Promise< TContent > | GetContent< TContent > (IContentRef reference, string manifestID="") |
Get the content data for a requested IContentRef. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache. More... | |
Promise< TContent > | GetContent< TContent > (IContentRef< TContent > reference, string manifestID="") |
Get the content data for a requested IContentRef<TContent>. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache. More... | |
Promise< ClientManifest > | GetManifest (ContentQuery query) |
Promise< ClientManifest > | GetManifestWithID (string manifestID="") |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable. More... | |
Promise< ClientManifest > | GetManifest (string filter="", string manifestID="") |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable. More... | |
Promise< ClientManifest > | GetManifest (ContentQuery query, string manifestID="") |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable. More... | |
Promise< ClientManifest > | GetCurrent (string scope="") |
Get the latest default ClientManifest by asking the Beamable Cloud. More... | |
void | SwitchDefaultManifestID (string manifestID) |
It is possible to have more than one ClientManifest providing content data for a game. By default, there is only one manifest with an ID of "global". Every piece of content found using GetContent(string, string) has the opportunity to pass a custom manifestID. However, if no custom manifest ID is given, then the content will be resolved using the default manifest ID, which is configured with this method. After this method runs, all future calls to GetContent(string,string) will default to the new manifest. More... | |
Public Member Functions inherited from Beamable.Common.Api.ISupportsGet< ClientManifest > | |
Promise< TData > | 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... | |
Public Attributes | |
Action< string > | OnManifestChanged |
An event that triggers when the default manifest has been changed using the SwitchDefaultManifestID method. The event has a string parameter that represents the new manifest ID. | |
ContentDataInfoWrapper | ContentDataInfo |
A utility used during Content Baking. This field should not be used in regular use. To resolve content, please use the GetContent(string,string) method. | |
Properties | |
string | CurrentDefaultManifestID = "global" [get] |
The default content manifest ID controls which manifest the ContentService will use. By default, the value will be "global". You can customize the value by using the ContentParameterProvider, or by calling the SwitchDefaultManifestID method. | |
IBeamableFilesystemAccessor | FilesystemAccessor [get] |
The IBeamableFilesystemAccessor is used by the ContentSerializer<TContentBase> to handle file read and writes for content disk caches. | |
ManifestSubscription | Subscribable [get] |
The ManifestSubscription will be notified when there are content updates from the Beamable Cloud. This field should not be used, and will be deprecated in a future release. | |
Dictionary< string, ManifestSubscription > | Subscribables [get] |
A dictionary from manifest ID to ManifestSubscription that the game client is currently observing. This field should not be used, and will be deprecated in a future release. | |
IBeamableRequester | Requester [get] |
This field is obsolete, please do not use. | |
Properties inherited from Beamable.Api.IHasPlatformSubscriber< ManifestSubscription, ClientManifest, ClientManifest > | |
TPlatformSubscriber | Subscribable [get] |
Allows scopes to consume fresh data when available. | |
Properties inherited from Beamable.Api.IHasPlatformSubscribers< ManifestSubscription, ClientManifest, ClientManifest > | |
Dictionary< string, TPlatformSubscriber > | Subscribables [get] |
Allows scopes to consume fresh data when available. | |
This type defines the Client main entry point for the Content feature.
See Beamable.API script reference
|
inline |
Get the content data for a requested IContentRef. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache.
reference | A IContentRef that contains a fully qualified content id. |
manifestID | By default, use the "global" manifest. A realm can have multiple groupings of content, where each group has its own manifest. If you haven't published multiple manifests, you should not use this field. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
Get the content data for a requested content id. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache.
contentId | A content id should be a dot separated string, with at least 1 dot. The right-most clause represents the content's name, and everything else represents the content's type. |
manifestID | By default, use the "global" manifest. A realm can have multiple groupings of content, where each group has its own manifest. If you haven't published multiple manifests, you should not use this field. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
Get the content data for a requested content id. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache.
contentId | A content id should be a dot separated string, with at least 1 dot. The right-most clause represents the content's name, and everything else represents the content's type. |
contentType | If you know the type of the content, you can pass it so that the resulting IContentObject will be castable to the given contentType |
manifestID | By default, use the "global" manifest. A realm can have multiple groupings of content, where each group has its own manifest. If you haven't published multiple manifests, you should not use this field. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
Get the content data for a requested IContentRef. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache.
reference | A IContentRef that contains a fully qualified content id. |
manifestID | By default, use the "global" manifest. A realm can have multiple groupings of content, where each group has its own manifest. If you haven't published multiple manifests, you should not use this field. |
TContent | The type of the content that the reference refers to. |
Implements Beamable.Common.Api.Content.IContentApi.
TContent | : | ContentObject | |
TContent | : | new() |
|
inline |
Get the content data for a requested IContentRef<TContent>. The content is stored on Beamable servers and cached on each player's device. This method will always get the latest version of the content. Each time there is a new version, this method will cause a network call. Once the version has been cached, this method will read from the cache.
reference | A IContentRef that contains a fully qualified content id. |
manifestID | By default, use the "global" manifest. A realm can have multiple groupings of content, where each group has its own manifest. If you haven't published multiple manifests, you should not use this field. |
TContent | The type of the content that the reference refers to. |
Implements Beamable.Common.Api.Content.IContentApi.
TContent | : | ContentObject | |
TContent | : | new() |
|
inline |
Get the latest default ClientManifest by asking the Beamable Cloud.
scope | The scope field should be ignored. Don't pass anything. |
|
inline |
query | A ContentQuery that will filter the resulting ClientManifest.entries field. |
|
inline |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable.
query | A ContentQuery that will filter the resulting ClientManifest.entries field. |
manifestID | A specific manifest ID. By default, this will resolve to the default "global" manifest. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable.
filter | A ContentQuery in string form that will filter the resulting ClientManifest.entries field |
manifestID | A specific manifest ID. By default, this will resolve to the default "global" manifest. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
A ClientManifest describes all the content available in a manifest for a realm. This method will always start a network request to get the manifest from Beamable.
manifestID | A specific manifest ID. By default, this will resolve to the default "global" manifest. |
Implements Beamable.Common.Api.Content.IContentApi.
|
inline |
It is possible to have more than one ClientManifest providing content data for a game. By default, there is only one manifest with an ID of "global". Every piece of content found using GetContent(string, string) has the opportunity to pass a custom manifestID. However, if no custom manifest ID is given, then the content will be resolved using the default manifest ID, which is configured with this method. After this method runs, all future calls to GetContent(string,string) will default to the new manifest.
manifestID | Some manifest ID |