Esempio n. 1
0
        protected override void InitIfNeeded()
        {
            {
                if (UsesDrawer != null)
                {
                    return;
                }

                UsesDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets"
                };
                UsedByDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets"
                };
                Duplicated         = new FR2_DuplicateTree2(this);
                SceneToAssetDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets",
                    isDrawRefreshSceneCache = true
                };
                RefUnUse = new FR2_RefDrawer(this)
                {
                    Lable = "Unsed Asset",
                    isDrawRefreshSceneCache = false
                };

                UsedInBuild = new FR2_UsedInBuild(this);
            }


            FR2_Cache.onReady -= OnReady;
            FR2_Cache.onReady += OnReady;

            FR2_Setting.OnIgnoreChange -= OnSelectionChange;
            FR2_Setting.OnIgnoreChange += OnSelectionChange;
            //Debug.Log(" FR2_Window ---> Init");
        }
Esempio n. 2
0
        protected override void InitIfNeeded()
        {
            {
                if (UsesDrawer != null)
                {
                    return;
                }

                UsesDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets"
                };
                UsedByDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets"
                };
                Duplicated         = new FR2_DuplicateTree2(this);
                SceneToAssetDrawer = new FR2_RefDrawer(this)
                {
                    Lable = "Assets",
                    isDrawRefreshSceneCache = false
                };
                RefUnUse = new FR2_RefDrawer(this)
                {
                    Lable = "Unsed Asset",
                    isDrawRefreshSceneCache = false
                };
                UsedInBuild = new FR2_UsedInBuild(this);
            }

            if (SceneUsesDrawer != null)
            {
                return;
            }

            SceneUsesDrawer = new FR2_RefDrawer(this)
            {
                Lable = "Scene Objects",
                isDrawRefreshSceneCache = true
            };
            RefInScene = new FR2_RefDrawer(this)
            {
                Lable = "Scene Objects",
                isDrawRefreshSceneCache = true
            };
            RefSceneInScene = new FR2_RefDrawer(this)
            {
                Lable = "Scene Objects",
                isDrawRefreshSceneCache = true
            };

            lockSelection = false;

#if UNITY_2018_OR_NEWER
            UnityEditor.SceneManagement.EditorSceneManager.activeSceneChangedInEditMode -= OnSceneChanged;
            UnityEditor.SceneManagement.EditorSceneManager.activeSceneChangedInEditMode += OnSceneChanged;
#elif UNITY_2017_OR_NEWER
            UnityEditor.SceneManagement.EditorSceneManager.activeSceneChanged -= OnSceneChanged;
            UnityEditor.SceneManagement.EditorSceneManager.activeSceneChanged += OnSceneChanged;
#endif

            FR2_Cache.onReady -= OnReady;
            FR2_Cache.onReady += OnReady;

            FR2_Setting.OnIgnoreChange -= OnSelectionChange;
            FR2_Setting.OnIgnoreChange += OnSelectionChange;

            Repaint();
        }