// Update is called once per frame
        void Update()
        {
            if (_mainEngine == null)
            {
                return;
            }

            _mainEngine.UpdateTexture();

            #region 2D mouse

            if (Browser2D != null)
            {
                //GetScreenCoords(true);
            }


            #endregion

            //Dialog
            if (_showDialog)
            {
                ShowDialog();
            }

            //Query
            if (_startQuery)
            {
                _startQuery = false;
                if (OnJSQuery != null)
                {
                    OnJSQuery(_jsQueryString);
                }
            }

            //Status
            if (_setUrl)
            {
                _setUrl = false;
                if (UIEnabled && mainUIPanel != null)
                {
                    mainUIPanel.UrlField.text = _setUrlString;
                }
            }

            if (UIEnabled)
            {
                if (_focused && (mainUIPanel == null || !mainUIPanel.UrlField.isFocused)) //keys
                {
                    _mainEngine.ProcessKeyEvents();
                }
            }

            _mainEngine.CheckMessage();
        }
        // Update is called once per frame
        private void Update()
        {
            if (_mainEngine == null)
            {
                return;
            }
            _mainEngine.UpdateTexture();


            //Dialog
            if (_showDialog)
            {
                ShowDialog();
            }

            //Query
            if (_startQuery)
            {
                _startQuery = false;
                if (OnJSQuery != null)
                {
                    OnJSQuery(_jsQueryString);
                }
            }

            //Status
            if (_setUrl)
            {
                _setUrl = false;
                if (UIEnabled && mainUIPanel != null)
                {
                    mainUIPanel.UrlField.text = _setUrlString;
                }
            }

            if (UIEnabled)
            {
                if (_focused && (mainUIPanel == null || !mainUIPanel.UrlField.isFocused)) //keys
                {
                    _mainEngine.ProcessKeyEvents();
                }
            }

            _mainEngine.CheckMessage();
        }