コード例 #1
0
        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();
        }
コード例 #2
0
 private void ModeToggle()
 {
     if (NavMeshEditorWindow.s_Styles == null)
     {
         NavMeshEditorWindow.s_Styles = new NavMeshEditorWindow.Styles();
     }
     this.m_Mode = (NavMeshEditorWindow.Mode)GUILayout.Toolbar((int)this.m_Mode, NavMeshEditorWindow.s_Styles.m_ModeToggles, "LargeButton", new GUILayoutOption[0]);
 }
コード例 #3
0
		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();
		}