public void OnClicked() { Debug.Log("onclicke"); GameObject obj = GameObject.Find("Image1"); Image image1 = obj.GetComponent <Image>(); RenderImageScript scr = image1.GetComponent <RenderImageScript> (); scr.RemakeImageFast(); }
void ExportJpg(string path) { GameObject obj = GameObject.Find("Image1"); RenderImageScript image = obj.GetComponent <RenderImageScript>(); Texture2D tex = image._finalTex; byte[] data = tex.EncodeToJPG(); System.IO.File.WriteAllBytes(path, data); }