UnityEditor.NavMeshObstacleInspector.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(this.m_Shape, new GUILayoutOption[0]);
            if (EditorGUI.EndChangeCheck())
            {
                base.serializedObject.ApplyModifiedProperties();
                (base.target as NavMeshObstacle).FitExtents();
                base.serializedObject.Update();
            }
            EditorGUILayout.PropertyField(this.m_Center, new GUILayoutOption[0]);
            if (this.m_Shape.enumValueIndex == 0)
            {
                EditorGUI.BeginChangeCheck();
                float x = EditorGUILayout.FloatField("Radius", this.m_Extents.vector3Value.x, new GUILayoutOption[0]);
                float num2 = EditorGUILayout.FloatField("Height", this.m_Extents.vector3Value.y * 2f, new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_Extents.vector3Value = new Vector3(x, num2 / 2f, x);
                }
            }
            else if (this.m_Shape.enumValueIndex == 1)
            {
                EditorGUI.BeginChangeCheck();
                Vector3 vector3 = (Vector3) (this.m_Extents.vector3Value * 2f);
                vector3 = EditorGUILayout.Vector3Field("Size", vector3, new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_Extents.vector3Value = (Vector3) (vector3 / 2f);
                }
            }
            EditorGUILayout.PropertyField(this.m_Carve, new GUILayoutOption[0]);
            if (this.m_Carve.boolValue)
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(this.m_MoveThreshold, new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_TimeToStationary, new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_CarveOnlyStationary, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
            }
            base.serializedObject.ApplyModifiedProperties();
        }
    }
NavMeshObstacleInspector