public IEnumerator UploadTexture2D() { Debug.Log("Uploaded initiated"); // Create a URL and add parameters to the end of it. string myURL = "http://clientes.cheny.com.br/stephanie/es2.php"; myURL += "?webfilename=image.png&webusername=cheny&webpassword=chenyrox"; // Create our ES2Web object. Texture2D texture = GetComponent<UITexture>().mainTexture as Texture2D; ES2Web web = new ES2Web(myURL); yield return StartCoroutine( web.UploadImage(texture) ); if(web.isError) { // Enter your own code to handle errors here. Debug.LogError(web.errorCode + ":" + web.error); } }
public IEnumerator UploadTexture2D() { Debug.Log("Uploaded initiated"); // Create a URL and add parameters to the end of it. string myURL = "http://clientes.cheny.com.br/stephanie/es2.php"; myURL += "?webfilename=image.png&webusername=cheny&webpassword=chenyrox"; // Create our ES2Web object. Texture2D texture = GetComponent <UITexture>().mainTexture as Texture2D; ES2Web web = new ES2Web(myURL); yield return(StartCoroutine(web.UploadImage(texture))); if (web.isError) { // Enter your own code to handle errors here. Debug.LogError(web.errorCode + ":" + web.error); } }