예제 #1
0
        private void dNodeLimit(NavGridTool tool)
        {
            tool.NODE_RENDER_LIMIT = Mathf.Clamp(EditorGUILayout.IntField("Node Render Limit", tool.NODE_RENDER_LIMIT), 25, 10000);

            if (GUILayout.Button("Apply Now"))
            {
                tool.RegenerateSubGrids();
            }
        }
예제 #2
0
        private void DrawModeControls(NavGridTool tool)
        {
            GUILayout.BeginHorizontal("box");
            {
                // Render Toggle
                if (NavGridTool3DGUI.currentMode == NavGridTool3DGUI.Mode.RENDER || NavGridTool3DGUI.currentMode == NavGridTool3DGUI.Mode.EDIT)
                {
                    if (GUILayout.Button("Disable Render"))
                    {
                        tool.GUI3D.SetMode(NavGridTool3DGUI.Mode.DISABLED);
                        tool.UnselectNode();
                    }
                }
                else
                {
                    if (GUILayout.Button("Enable Render"))
                    {
                        tool.GUI3D.SetMode(NavGridTool3DGUI.Mode.RENDER);
                    }
                }

                // View | Edit Mode
                if (NavGridTool3DGUI.currentMode == NavGridTool3DGUI.Mode.DISABLED)
                {
                    GUILayout.Button("...");
                }
                else
                {
                    if (NavGridTool3DGUI.currentMode == NavGridTool3DGUI.Mode.RENDER)
                    {
                        if (GUILayout.Button("Edit Mode ->"))
                        {
                            tool.GUI3D.SetMode(NavGridTool3DGUI.Mode.EDIT);
                            tool.RegenerateSubGrids();
                        }
                    }
                    else if (NavGridTool3DGUI.currentMode == NavGridTool3DGUI.Mode.EDIT)
                    {
                        if (GUILayout.Button("Render Mode ->"))
                        {
                            tool.GUI3D.SetMode(NavGridTool3DGUI.Mode.RENDER);
                            tool.UnselectNode();
                        }
                    }
                }
            }
            GUILayout.EndHorizontal();
        }