ES3Cloud Constructor

public ES3Cloud(string url, string apiKey)

Description

Creates a new ES3Cloud object which allows us to upload and download data from the given URL, usually pointing to an ES3.php file.

For more information, see the Uploading and Downloading Files using ES3Cloud guide.

Parameters

[table th=”0″]url,”The URL to the ES3.php file on your server.”

apiKey,”The API key you were given when setting up ES3Cloud on your server.”[/table]

Returns

An new ES3Cloud object.

Examples

C#

// Create a new ES3Cloud object with the URL to our ES3.php file.
var cloud = new ES3Cloud("https://www.myserver.com/ES3Cloud.php", "myAPIKey");

// Synchronise a local file with the cloud for a particular user.
yield return StartCoroutine(cloud.Sync("myFile.es3", "myUser", "myUsersPassword"));

if(cloud.isError)
    Debug.LogError(cloud.error);

// Synchronise another local file, but make it global for all users.
yield return StartCoroutine(cloud.Sync("myGlobalFile.es3"));

if(cloud.isError)
    Debug.LogError(cloud.error);

JS

// Create a new ES3Cloud object with the URL to our ES3.php file.
var cloud = new ES3Cloud("https://www.myserver.com/ES3.php", "myAPIKey");

// Synchronise a local file with the cloud for a particular user.
yield cloud.SyncFile("myFile.es3", "myUser", "myUsersPassword");

if(cloud.isError)
    Debug.LogError(cloud.error);

// Synchronise another local file, but make it global for all users.
yield cloud.SyncFile("myGlobalFile.es3");

if(cloud.isError)
    Debug.LogError(cloud.error);