public override void OnInspectorGUI()
{
if (s_Styles == null)
{
s_Styles = new Styles();
}
base.serializedObject.Update();
EditorGUILayout.LabelField(s_Styles.m_AgentSizeHeader, EditorStyles.boldLabel, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_Radius, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_Height, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_BaseOffset, new GUILayoutOption[0]);
EditorGUILayout.Space();
EditorGUILayout.LabelField(s_Styles.m_AgentSteeringHeader, EditorStyles.boldLabel, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_Speed, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_AngularSpeed, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_Acceleration, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_StoppingDistance, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_AutoBraking, new GUILayoutOption[0]);
EditorGUILayout.Space();
EditorGUILayout.LabelField(s_Styles.m_AgentAvoidanceHeader, EditorStyles.boldLabel, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_ObstacleAvoidanceType, GUIContent.Temp("Quality"), new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_AvoidancePriority, GUIContent.Temp("Priority"), new GUILayoutOption[0]);
EditorGUILayout.Space();
EditorGUILayout.LabelField(s_Styles.m_AgentPathFindingHeader, EditorStyles.boldLabel, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_AutoTraverseOffMeshLink, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_AutoRepath, new GUILayoutOption[0]);
string[] navMeshAreaNames = GameObjectUtility.GetNavMeshAreaNames();
long longValue = this.m_WalkableMask.longValue;
int mask = 0;
for (int i = 0; i < navMeshAreaNames.Length; i++)
{
int navMeshAreaFromName = GameObjectUtility.GetNavMeshAreaFromName(navMeshAreaNames[i]);
if (((((int) 1) << navMeshAreaFromName) & longValue) != 0L)
{
mask |= ((int) 1) << i;
}
}
Rect position = GUILayoutUtility.GetRect(EditorGUILayout.kLabelFloatMinW, EditorGUILayout.kLabelFloatMaxW, 16f, 16f, EditorStyles.layerMaskField);
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = this.m_WalkableMask.hasMultipleDifferentValues;
int num5 = EditorGUI.MaskField(position, "Area Mask", mask, navMeshAreaNames, EditorStyles.layerMaskField);
EditorGUI.showMixedValue = false;
if (EditorGUI.EndChangeCheck())
{
if (num5 == -1)
{
this.m_WalkableMask.longValue = 0xffffffffL;
}
else
{
uint num6 = 0;
for (int j = 0; j < navMeshAreaNames.Length; j++)
{
if (((num5 >> j) & 1) != 0)
{
num6 |= ((uint) 1) << GameObjectUtility.GetNavMeshAreaFromName(navMeshAreaNames[j]);
}
}
this.m_WalkableMask.longValue = num6;
}
}
base.serializedObject.ApplyModifiedProperties();
}