UnityEditor.OffMeshLinkInspector.SelectNavMeshArea C# (CSharp) Method

SelectNavMeshArea() private method

private SelectNavMeshArea ( ) : void
return void
        private void SelectNavMeshArea()
        {
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = this.m_AreaIndex.hasMultipleDifferentValues;
            string[] navMeshAreaNames = GameObjectUtility.GetNavMeshAreaNames();
            int intValue = this.m_AreaIndex.intValue;
            int selectedIndex = -1;
            for (int i = 0; i < navMeshAreaNames.Length; i++)
            {
                if (GameObjectUtility.GetNavMeshAreaFromName(navMeshAreaNames[i]) == intValue)
                {
                    selectedIndex = i;
                    break;
                }
            }
            int index = EditorGUILayout.Popup("Navigation Area", selectedIndex, navMeshAreaNames, new GUILayoutOption[0]);
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                int navMeshAreaFromName = GameObjectUtility.GetNavMeshAreaFromName(navMeshAreaNames[index]);
                this.m_AreaIndex.intValue = navMeshAreaFromName;
            }
        }
    }