Class CloudCode
Client SDK for Cloud Code. https://dashboard.unity3d.com/cloud-code
Streamline your game code in the cloud. Cloud Code shifts your game logic away from your servers, interacting seamlessly with backend services.
Namespace: Unity.Services.CloudCode
Syntax
public static class CloudCode : object
Methods
CallEndpointAsync(String, Object)
Calls a Cloud Code function.
Declaration
public static Task<string> CallEndpointAsync(string function, object args)
Parameters
Type | Name | Description |
---|---|---|
String | function | Cloud Code function to call |
Object | args | Arguments for the cloud code function. Will be serialized to JSON. |
Returns
Type | Description |
---|---|
Task<String> | string representation of the return value of the called function. intended to enable custom serializers |
CallEndpointAsync<TResult>(String, Object)
Calls a Cloud Code function.
Declaration
public static Task<TResult> CallEndpointAsync<TResult>(string function, object args)
Parameters
Type | Name | Description |
---|---|---|
String | function | Cloud Code function to call |
Object | args | Arguments for the cloud code function. Will be serialized to JSON. |
Returns
Type | Description |
---|---|
Task<TResult> | serialized output from the called function |
Type Parameters
Name | Description |
---|---|
TResult | Serialized from JSON returned by Cloud Code |