public void Destroy() { if (webview != null) { webview.OnDestory(); } Instance = null; APCache.SaveToLocal(); }
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; }
public void OnEnable() { // re-binding the webview Instance // if (Instance == null) { Instance = this; AssetNotification.webCommunicationService.Init(this.webview); } if (!string.IsNullOrEmpty(EditorPrefs.GetString(AssetNotification.PrepareOnLoad.AFTERBUILD_A_PLUS))) { AssetNotification.webCommunicationService.RefreshAll(); EditorPrefs.DeleteKey(AssetNotification.PrepareOnLoad.AFTERBUILD_A_PLUS); } SetMinMaxSizes(); }
public static void load() { if (Instance != null) { return; } ClearPrevoiusURL(); if (!PreferencesItems.IsDockableWindowStyle) { Instance = GetWindow <APlusWindow>(true, TITLE, true); Instance.InitWebView(GUIClip.Unclip(new Rect(0, 0, Instance.position.x, Instance.position.y))); } else { Type[] desiredDockNextTo = new Type[] { typeof(SceneView) }; Instance = EditorWindow.GetWindow <APlusWindow>(TITLE, desiredDockNextTo); Instance.SetMinMaxSizes(); Instance.Show(); } Instance.InDockableWindowStyle = PreferencesItems.IsDockableWindowStyle; }
private void RefreshCache(string msg, object callback) { APlusWindow.RefreshCache(); }
private void TriggerBuild(string args, object callback) { APlusWindow.FindUnusedAssets(); }