ES3Cloud Constructor
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
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. |
Returns
An new ES3Cloud object.
Examples
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// 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); |