Пример #1
0
    protected virtual bool OnClose(WWebView webView)
    {
        DebugLog.DebugLogInfo("00ff00", "OnClose");
//#if UNITY_EDITOR
        // NOTE: Keep in mind that you are just watching the DEMO now.
        // Destroy webview instance not WWebView component.
        webView.Destroy();

        // Don't destroy WWebView component for this demo.
        // In most cases, you will return true to remove the component.
        return(false);
//#else
//        // In "real" game, you will never quit your app since the webview is closed.
//        UnityEngine.Application.Quit();
//        return true;
//#endif
    }
Пример #2
0
    protected virtual bool OnClose(WWebView webView)
    {
        // NOTE: Keep in mind that you are now watching the "DEMO".
        // In most cases, you simply return true to destory the webview modules(instance & component)

        if (status != null)
        {
            status.text = "OnClose";
        }

#if UNITY_EDITOR
        // In Editor mode, only destroy the webview instance not component.
        // Don't destroy WWebView component in this demo.
        webView.Destroy();
        return(false);
#else
        // In "real" game, you will never quit your game even if the webview has been closed.
        UnityEngine.Application.Quit();
        return(true);
#endif
    }