Exemple #1
0
 public void OnGUI()
 {
     EditorGUILayout.Space();
     this.ModeToggle();
     EditorGUILayout.Space();
     this.InitProjectSettings();
     this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, new GUILayoutOption[0]);
     NavMeshEditorWindow.Mode mode = this.m_Mode;
     if (mode != NavMeshEditorWindow.Mode.ObjectSettings)
     {
         if (mode != NavMeshEditorWindow.Mode.SceneBakeSettings)
         {
             if (mode == NavMeshEditorWindow.Mode.AreaSettings)
             {
                 this.AreaSettings();
             }
         }
         else
         {
             this.SceneBakeSettings();
         }
     }
     else
     {
         NavMeshEditorWindow.ObjectSettings();
     }
     EditorGUILayout.EndScrollView();
     NavMeshEditorWindow.BakeButtons();
 }
        public void OnGUI()
        {
            if (this.m_Object.targetObject == null)
            {
                this.Init();
            }
            if (NavMeshEditorWindow.s_Styles == null)
            {
                NavMeshEditorWindow.s_Styles = new NavMeshEditorWindow.Styles();
            }
            this.m_Object.Update();
            EditorGUILayout.Space();
            this.ModeToggle();
            EditorGUILayout.Space();
            this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, new GUILayoutOption[0]);
            switch (this.m_Mode)
            {
            case NavMeshEditorWindow.Mode.ObjectSettings:
                NavMeshEditorWindow.ObjectSettings();
                break;

            case NavMeshEditorWindow.Mode.BakeSettings:
                this.BakeSettings();
                break;

            case NavMeshEditorWindow.Mode.AreaSettings:
                this.AreaSettings();
                break;
            }
            EditorGUILayout.EndScrollView();
            NavMeshEditorWindow.BakeButtons();
            this.m_Object.ApplyModifiedProperties();
        }