ES2Web.Load3DArray
Parameters
tag |
The tag of the data we want to load. |
Returns
T[ , , ] | Our loaded 2D array. |
Description
Loads the 3D array of type T from the data downloaded using ES2Web. You must yield ES2Web.Download() before calling this method.
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
public IEnumerator DownloadEntireFile() { // As we don't specify a tag, it will download everything // within the file 'myFile.txt'. string myURL = "https://www.server.com/ES2.php?webfilename=myFile.txt"; ES2Web web = new ES2Web(myURL); // Start downloading our data and wait for it to finish. yield return StartCoroutine(web.Download()); if(web.isError) { // Enter your own code to handle errors here. // For a list of error codes, see www.moodkie.com/easysave/ES2Web.ErrorCodes.php Debug.LogError(web.errorCode + ":" + web.error); } // Use ES2Web.Load3DArray(string tag) to load our data. int[,,] data = web.Load3DArray<int>("myTag"); } |
JS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function DownloadEntireFile() { // As we don't specify a tag, it will download everything // within the file 'myFile.txt'. var myURL = "https://www.server.com/ES2.php?webfilename=myFile.txt"; var web = new ES2Web(myURL); // Start downloading our data and wait for it to finish. yield StartCoroutine(web.Download()); if(web.isError) { // Enter your own code to handle errors here. // For a list of error codes, see www.moodkie.com/easysave/ES2Web.ErrorCodes.php Debug.LogError(web.errorCode + ":" + web.error); } // Use ES2Web.Load3DArray(string tag) to load our data. var data = web.Load3DArray.<int>("myTag"); } |