Exemplo n.º 1
0
        static LayoutInfo DefaultLayout(IWindowManager wm)
        {
            // デフォルトのEditorレイアウトを設定

            bool             isDialog;
            WindowDescriptor sceneWd;
            GameObject       sceneContent;

            wm.CreateWindow(RuntimeWindowType.Scene.ToString(), out sceneWd, out sceneContent, out isDialog);

            WindowDescriptor inspectorWd;
            GameObject       inspectorContent;

            wm.CreateWindow(RuntimeWindowType.Inspector.ToString(), out inspectorWd, out inspectorContent, out isDialog);

            WindowDescriptor hierarchyWd;
            GameObject       hierarchyContent;

            wm.CreateWindow(RuntimeWindowType.Hierarchy.ToString(), out hierarchyWd, out hierarchyContent, out isDialog);

            WindowDescriptor consoleWd;
            GameObject       consoleContent;

            wm.CreateWindow(RuntimeWindowType.Console.ToString(), out consoleWd, out consoleContent, out isDialog);

            LayoutInfo layout = new LayoutInfo(false,
                                               wm.CreateLayoutInfo(sceneContent.transform, "Scene", sceneWd.Icon),
                                               new LayoutInfo(true, wm.CreateLayoutInfo(hierarchyContent.transform, "Devices/Sensors", hierarchyWd.Icon), wm.CreateLayoutInfo(inspectorContent.transform, "Properties", inspectorWd.Icon), 0.5f),
                                               0.75f);

            return(layout);
        }
Exemplo n.º 2
0
        public static LayoutInfo GetBuiltInDefaultLayout(this IWindowManager wm)
        {
            WindowDescriptor sceneWd;
            GameObject       sceneContent;
            bool             isDialog;

            wm.CreateWindow(RuntimeWindowType.Scene.ToString(), out sceneWd, out sceneContent, out isDialog);

            WindowDescriptor gameWd;
            GameObject       gameContent;

            wm.CreateWindow(RuntimeWindowType.Game.ToString(), out gameWd, out gameContent, out isDialog);

            WindowDescriptor inspectorWd;
            GameObject       inspectorContent;

            wm.CreateWindow(RuntimeWindowType.Inspector.ToString(), out inspectorWd, out inspectorContent, out isDialog);

            WindowDescriptor consoleWd;
            GameObject       consoleContent;

            wm.CreateWindow(RuntimeWindowType.Console.ToString(), out consoleWd, out consoleContent, out isDialog);

            WindowDescriptor hierarchyWd;
            GameObject       hierarchyContent;

            wm.CreateWindow(RuntimeWindowType.Hierarchy.ToString(), out hierarchyWd, out hierarchyContent, out isDialog);

            WindowDescriptor projectWd;
            GameObject       projectContent;

            wm.CreateWindow(RuntimeWindowType.Project.ToString(), out projectWd, out projectContent, out isDialog);

            WindowDescriptor animationWd;
            GameObject       animationContent;

            wm.CreateWindow(RuntimeWindowType.Animation.ToString(), out animationWd, out animationContent, out isDialog);

            LayoutInfo layout = new LayoutInfo(false,
                                               new LayoutInfo(false,
                                                              new LayoutInfo(true,
                                                                             wm.CreateLayoutInfo(inspectorContent.transform, inspectorWd.Header, inspectorWd.Icon),
                                                                             wm.CreateLayoutInfo(consoleContent.transform, consoleWd.Header, consoleWd.Icon),
                                                                             0.5f),
                                                              new LayoutInfo(true,
                                                                             wm.CreateLayoutInfo(sceneContent.transform, sceneWd.Header, sceneWd.Icon),
                                                                             new LayoutInfo(
                                                                                 wm.CreateLayoutInfo(gameContent.transform, gameWd.Header, gameWd.Icon),
                                                                                 wm.CreateLayoutInfo(animationContent.transform, animationWd.Header, animationWd.Icon)),
                                                                             0.75f),
                                                              0.25f),
                                               new LayoutInfo(true,
                                                              wm.CreateLayoutInfo(hierarchyContent.transform, hierarchyWd.Header, hierarchyWd.Icon),
                                                              wm.CreateLayoutInfo(projectContent.transform, projectWd.Header, projectWd.Icon),
                                                              0.5f),
                                               0.75f);

            return(layout);
        }
        static LayoutInfo DefaultLayout(IWindowManager wm)
        {
            bool isDialog;

            WindowDescriptor sceneWd;
            GameObject       sceneContent;

            wm.CreateWindow(RuntimeWindowType.Scene.ToString(), out sceneWd, out sceneContent, out isDialog);

            WindowDescriptor gameWd;
            GameObject       gameContent;

            wm.CreateWindow(RuntimeWindowType.Game.ToString(), out gameWd, out gameContent, out isDialog);

            WindowDescriptor inspectorWd;
            GameObject       inspectorContent;

            wm.CreateWindow(RuntimeWindowType.Inspector.ToString(), out inspectorWd, out inspectorContent, out isDialog);

            WindowDescriptor hierarchyWd;
            GameObject       hierarchyContent;

            wm.CreateWindow(RuntimeWindowType.Hierarchy.ToString(), out hierarchyWd, out hierarchyContent, out isDialog);

            LayoutInfo layout = new LayoutInfo(false,
                                               new LayoutInfo(
                                                   wm.CreateLayoutInfo(sceneContent.transform, sceneWd.Header, sceneWd.Icon),
                                                   wm.CreateLayoutInfo(gameContent.transform, gameWd.Header, gameWd.Icon)),
                                               new LayoutInfo(true,
                                                              wm.CreateLayoutInfo(inspectorContent.transform, inspectorWd.Header, inspectorWd.Icon),
                                                              wm.CreateLayoutInfo(hierarchyContent.transform, hierarchyWd.Header, hierarchyWd.Icon),
                                                              0.5f),
                                               0.75f);

            return(layout);
        }