private UniWebViewSafeBrowsing()
 {
     if (!UniWebViewHelper.IsEditor)
     {
         var listenerObject = new GameObject(id);
         listener = listenerObject.AddComponent <UniWebViewNativeListener>();
         UniWebViewNativeListener.AddListener(listener);
     }
 }
Esempio n. 2
0
    private void _init()
    {
        Rect       rect;
        GameObject obj2 = new GameObject(this.id);

        this.listener         = obj2.AddComponent <UniWebViewNativeListener>();
        obj2.transform.parent = base.transform;
        this.listener.webView = this;
        UniWebViewNativeListener.AddListener(this.listener);
        if (this.fullScreen)
        {
            rect = new Rect(0f, 0f, (float)GameLogic.ScreenWidth, (float)GameLogic.ScreenHeight);
        }
        else
        {
            rect = this.NextFrameRect();
        }
        UniWebViewInterface.Init(this.listener.Name, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
        this.isPortrait = GameLogic.ScreenHeight >= GameLogic.ScreenWidth;
    }
Esempio n. 3
0
    void Awake()
    {
        var listenerObject = new GameObject(id);

        listener = listenerObject.AddComponent <UniWebViewNativeListener>();
        listenerObject.transform.parent = transform;
        listener.webView = this;
        UniWebViewNativeListener.AddListener(listener);

        Rect rect;

        if (fullScreen)
        {
            rect = new Rect(0, 0, Screen.width, Screen.height);
        }
        else
        {
            rect = NextFrameRect();
        }

        UniWebViewInterface.Init(listener.Name, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
        isPortrait = Screen.height >= Screen.width;
    }