public void InitWebView(Rect webviewRect) { if (webview == null) { this.webview = ScriptableObject.CreateInstance <Webview>(); this.webview.hideFlags = HideFlags.HideAndDontSave; } this.webview.InitWebView(Webview.GetView(this), webviewRect, false); AssetNotification.webCommunicationService.Init(this.webview); docked = GetDocked(this); SetMinMaxSizes(); LoadEditor(); SetFocus(true); Instance = this; }
private void SetFocus(bool value) { if (!this.syncingFocus) { this.syncingFocus = true; if (this.webview != null) { if (value) { this.webview.SetHostView(Webview.GetView(this)); this.webview.Show(); this.repeatedShow = 5; } this.webview.SetFocus(value); } this.syncingFocus = false; } }