Ejemplo n.º 1
0
    protected void Awake()
    {
        webView.OnStartNavigation     += OnStartNavigation;
        webView.OnNavigationCompleted += OnNavigationCompleted;
        webView.OnNavigationFailed    += OnNavigationFailed;
        webView.OnReceiveMessage      += OnReceiveMessage;
        webView.OnEvaluateJavaScript  += OnEvaluateJavaScript;
        webView.OnClose += OnClose;

#if UNIWEBVIEW3_SUPPORTED
        webView.Initialize(new Vector4(0, margine, 0, 0), new Vector2(Screen.width, Screen.height - (margine * 2)));
#else
        webView.Initialize(new Vector4(0, margine, 0, margine), new Vector2(0, 0));
#endif
    }
Ejemplo n.º 2
0
    protected void Awake()
    {
        url = "file://" + Application.streamingAssetsPath + "/" + "demo.html";//"https://www.google.com"
        webView.OnStartNavigation     += OnStartNavigation;
        webView.OnNavigationCompleted += OnNavigationCompleted;
        webView.OnNavigationFailed    += OnNavigationFailed;
        webView.OnReceiveMessage      += OnReceiveMessage;
        webView.OnEvaluateJavaScript  += OnEvaluateJavaScript;
        webView.OnClose += OnClose;

#if UNIWEBVIEW3_SUPPORTED
        webView.Initialize(new Vector4(0, margine, 0, 0), new Vector2(Screen.width, Screen.height - (margine * 2)));
#else
        webView.Initialize(new Vector4(0, margine, 0, margine), new Vector2(0, 0));
#endif
    }
Ejemplo n.º 3
0
    public void InitWebView(WWebView webView)
    {
        webView.OnStartNavigation     += OnStartNavigation;
        webView.OnNavigationCompleted += OnNavigationCompleted;
        webView.OnNavigationFailed    += OnNavigationFailed;
        webView.OnReceiveMessage      += OnReceiveMessage;
        webView.OnEvaluateJavaScript  += OnEvaluateJavaScript;
        webView.OnClose += OnClose;

        webView.Initialize(new Vector4(0, 100f, 0, 0), new Vector2(x, y));
        //#if UNIWEBVIEW3_SUPPORTED
        //#else
        //webView.Initialize(new Vector4(0, margine, 0, margine), new Vector2(0, 0));
        //#endif
    }