ES2Web.GetFilenames

public string[] GetFilenames()

Returns

[table th=”0″]string[ ],”The filenames downloaded from the server.”[/table]

Description

Use this method after yielding ES2Web.DownloadFilenames to get the loaded filenames as a string array.

C#

public IEnumerator LogFilenames()
{
    ES2Web web = new ES2Web("https://www.server.com/ES2.php");
     
    // Start downloading our filenames and wait for it to finish.
    yield return StartCoroutine(web.DownloadFilenames());
     
    if(web.isError)
    {
        // Enter your own code to handle errors here.
        Debug.LogError(web.errorCode + ":" + web.error);
    }
     
    // Now get our filenames as an array ...
    string[] filenames = web.GetFilenames();
    // ... and log them to console.
    foreach(string filename in filenames)
        Debug.Log(filename);
}