示例#1
0
    public void OnClicked()
    {
        Debug.Log("onclicke");
        GameObject        obj    = GameObject.Find("Image1");
        Image             image1 = obj.GetComponent <Image>();
        RenderImageScript scr    = image1.GetComponent <RenderImageScript> ();

        scr.RemakeImageFast();
    }
示例#2
0
    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);
    }