Beispiel #1
0
        //ref in scene
        public FR2_RefDrawer Reset(string[] assetGUIDs, IWindow window)
        {
            refs  = FR2_SceneRef.FindRefInScene(assetGUIDs, true, SetRefInScene, window);
            dirty = true;
            if (list != null)
            {
                list.Clear();
            }

            return(this);
        }
Beispiel #2
0
        public FR2_RefDrawer ResetSceneUseSceneObjects(GameObject[] objs)
        {
            refs  = FR2_SceneRef.FindSceneUseSceneObjects(objs);
            dirty = true;
            if (list != null)
            {
                list.Clear();
            }

            return(this);
        }
Beispiel #3
0
        private string GetGroup(FR2_Ref rf)
        {
            // Debug.Log(Lable + "  " + FR2_Setting.GroupMode);
            if (FR2_Setting.GroupMode == Mode.None)
            {
                return(string.Empty);
            }

            if (rf.depth == 0)
            {
                return("Selection");
            }

            FR2_SceneRef sr = null;

            if (rf.isSceneRef)
            {
                sr = rf as FR2_SceneRef;
                if (sr == null)
                {
                    return(string.Empty);
                }
            }

            switch (FR2_Setting.GroupMode)
            {
            case Mode.Extension: return(rf.isSceneRef ? sr.targetType : rf.asset.extension);

            case Mode.Type:
            {
                return(rf.isSceneRef ? sr.targetType : AssetType.FILTERS[rf.type].name);
            }

            case Mode.Folder: return(rf.isSceneRef ? sr.scenePath : rf.asset.assetFolder);

            case Mode.Dependency:
            {
                return(rf.depth == 1 ? "Direct Usage" : "Indirect Usage");
            }
            }

            return(string.Empty);
        }