예제 #1
0
        public void Destroy()
        {
            if (webview != null)
            {
                webview.OnDestory();
            }

            Instance = null;
            APCache.SaveToLocal();
        }
예제 #2
0
        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;
        }
예제 #3
0
        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();
        }
예제 #4
0
        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;
        }
예제 #5
0
 private void RefreshCache(string msg, object callback)
 {
     APlusWindow.RefreshCache();
 }
예제 #6
0
 private void TriggerBuild(string args, object callback)
 {
     APlusWindow.FindUnusedAssets();
 }