Ejemplo n.º 1
0
        private static IEnumerable <Type> GetDefaultPaneTypes()
        {
            const string k_PaneTypesSectionName = "pane_types";

            if (!ModeService.HasSection(ModeService.currentIndex, k_PaneTypesSectionName))
            {
                return(k_PaneTypes);
            }
            return(GetCurrentModePaneTypes(k_PaneTypesSectionName));
        }
Ejemplo n.º 2
0
        private static IEnumerable <Type> GetDefaultPaneTypes()
        {
            const string k_PaneTypesSectionName = "pane_types";

            if (!ModeService.HasSection(ModeService.currentIndex, k_PaneTypesSectionName))
            {
                return(k_PaneTypes);
            }

            var modePaneTypes = ModeService.GetModeDataSectionList <string>(ModeService.currentIndex, k_PaneTypesSectionName).ToList();

            return(TypeCache.GetTypesDerivedFrom <EditorWindow>().Where(t => modePaneTypes.Any(mpt => t.Name.EndsWith(mpt))).ToArray());
        }
Ejemplo n.º 3
0
        protected Type[] GetPaneTypes()
        {
            const string k_PaneTypesSectionName = "pane_types";

            if (!ModeService.HasSection(ModeService.currentIndex, k_PaneTypesSectionName))
            {
                return new[]
                       {
                           typeof(SceneView),
                           typeof(GameView),
                           typeof(InspectorWindow),
                           typeof(SceneHierarchyWindow),
                           typeof(ProjectBrowser),
                           typeof(ProfilerWindow),
                           typeof(AnimationWindow)
                       }
            }
            ;

            var modePaneTypes = ModeService.GetModeDataSectionList <string>(ModeService.currentIndex, k_PaneTypesSectionName).ToArray();

            return(EditorAssemblies.SubclassesOf(typeof(EditorWindow)).Where(t => modePaneTypes.Any(mpt => t.Name.EndsWith(mpt))).ToArray());
        }