private void Update()
    {
        if (!CheckWebView())
        {
            return;
        }

        if (webView.IsDirty)
        {
            Awesomium.Mono.RenderBuffer rBuffer = webView.Render();

            if (rBuffer != null)
            {
                Utilities.DrawBuffer(rBuffer, ref texture, ref Pixels, ref PixelsHandle);
            }
        }
    }
Example #2
0
    private void SetToWebViewRender()
    {
        // Set material to the webview texture.
        if (GetComponent <Renderer>())
        {
            GetComponent <Renderer>().material.mainTexture = texture;
            GetComponent <Renderer>().material.shader      = defaultShader;
        }
        else if (GetComponent(typeof(GUITexture)))
        {
            gui         = GetComponent(typeof(GUITexture)) as GUITexture;
            gui.texture = texture;
        }

        Awesomium.Mono.RenderBuffer rBuffer = webView.Render();

        if (rBuffer != null)
        {
            Utilities.DrawBuffer(rBuffer, ref texture, ref Pixels, ref PixelsHandle);
            showingLoadingTexture = false;
        }
    }