ES2Web.UploadImage

public IEnumerator UploadImage(Texture2D image)

Parameters

[table th=”0″]image,”The Texture2D to upload.”[/table]

Returns

[table th=”0″]IEnumerator,”The IEnumerator for the coroutine.”[/table]

Description

Uploads an image, stored as a PNG.

C#

Uploads the renderer’s main Texture to the database

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

var texture = renderer.material.mainTexture;
var web = new ES2Web("https://site.com/ES2.php?webfilename=image.png");
yield return StartCoroutine( web.UploadImage(texture) );