コード例 #1
0
 private void Awake()
 {
     this._currentGUID = Guid.NewGuid().ToString();
     ((Object)((Component)this).get_gameObject()).set_name(((Object)((Component)this).get_gameObject()).get_name() + this._currentGUID);
     UniWebViewPlugin.Init(((Object)((Component)this).get_gameObject()).get_name(), this.insets.top, this.insets.left, this.insets.bottom, this.insets.right);
     this._lastScreenHeight = UniWebViewHelper.screenHeight;
 }
コード例 #2
0
 void Awake()
 {
     _currentGUID    = System.Guid.NewGuid().ToString();
     gameObject.name = gameObject.name + _currentGUID;
     UniWebViewPlugin.Init(gameObject.name,
                           this.insets.top,
                           this.insets.left,
                           this.insets.bottom,
                           this.insets.right);
             #if UNITY_EDITOR
     CreateTexture(this.insets.left,
                   this.insets.bottom,
                   Screen.width - this.insets.left - this.insets.right,
                   Screen.height - this.insets.top - this.insets.bottom
                   );
             #endif
 }
コード例 #3
0
ファイル: WWebView.cs プロジェクト: RelinkaKing/UnityPC
        /// <summary>
        /// Setup the WWebView.
        /// </summary>
        private void Setup()
        {
            if (setup == false)
            {
                var listenerObject = new GameObject(guid);
                listener = listenerObject.AddComponent <WWebViewListener>();
                listenerObject.transform.parent = transform;
                listener.WebView = this;

#if UNIWEBVIEW3_SUPPORTED
                UniWebViewInterface.Init(listener.Name, (int)position.x, (int)position.y, (int)size.x, (int)size.y);
#elif UNIWEBVIEW2_SUPPORTED
                UniWebViewPlugin.Init(listener.Name, (int)position.y, (int)position.x, (int)position.w, (int)position.z);
#else
                WWebViewPlugin.Init(listener.Name, (int)position.y, (int)position.x, (int)position.w, (int)position.z, (int)size.x, (int)size.y);
#endif
                setup = true;
            }
        }
コード例 #4
0
    void Awake()
    {
        _currentGUID = System.Guid.NewGuid().ToString();
        //gameObject.name = gameObject.name;// + _currentGUID;
        UniWebViewPlugin.Init(gameObject.name,
                              this.insets.top,
                              this.insets.left,
                              this.insets.bottom,
                              this.insets.right);
        _lastScreenHeight = UniWebViewHelper.screenHeight;

        #if UNITY_EDITOR
        _screenScale = UniWebViewHelper.screenScale;
        CreateTexture(this.insets.left,
                      this.insets.bottom,
                      Screen.width - this.insets.left - this.insets.right,
                      Screen.height - this.insets.top - this.insets.bottom
                      );
        #endif
    }