Exemple #1
0
        /// <summary>
        /// Real-time rendering of webview content to the specified texture.
        /// </summary>
        /// <param name="texture">
        /// Texture in which the content of the webview will be rendered
        /// </param>
        public void SetTexture(Texture2D texture)
        {
            Setup();

#if UNIWEBVIEW3_SUPPORTED
            UniWebViewInterface.SetTexture(listener.Name, texture);
            StartCoroutine("OnRenderTexture", UniWebViewInterface.GetRenderEventFunc());
#elif UNIWEBVIEW2_SUPPORTED
            UniWebViewPlugin.SetTexture(listener.Name, texture);
            StartCoroutine("OnRenderTexture", UniWebViewPlugin.GetRenderEventFunc());
#else
            WWebViewPlugin.SetTexture(listener.Name, texture);
            StartCoroutine("OnRenderTexture", WWebViewPlugin.GetRenderEventFunc());
#endif
        }