ES2Web.UploadImage
Parameters
image | The Texture2D to upload. |
Returns
IEnumerator | The IEnumerator for the coroutine. |
Description
Uploads an image, stored as a PNG.
C#
Uploads the renderer’s main Texture to the database
1 2 3 |
Texture2D texture = renderer.material.mainTexture; ES2Web web = new ES2Web("https://site.com/ES2.php?webfilename=image.png"); yield return StartCoroutine( web.UploadImage(texture) ); |
JS
Uploads the renderer’s main Texture to the database
1 2 3 |
var texture = renderer.material.mainTexture; var web = new ES2Web("https://site.com/ES2.php?webfilename=image.png"); yield return StartCoroutine( web.UploadImage(texture) ); |