Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NavMeshComponents/Editor/NavMeshComponentsGUIUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public static class NavMeshComponentsGUIUtility
public static void AreaPopup(Rect rect, string labelName, SerializedProperty areaProperty)
{
var areaIndex = -1;
var areaNames = GameObjectUtility.GetNavMeshAreaNames();
var areaNames = NavMesh.GetAreaNames();
for (var i = 0; i < areaNames.Length; i++)
{
var areaValue = GameObjectUtility.GetNavMeshAreaFromName(areaNames[i]);
var areaValue = NavMesh.GetAreaFromName(areaNames[i]);
if (areaValue == areaProperty.intValue)
areaIndex = i;
}
Expand All @@ -28,7 +28,7 @@ public static void AreaPopup(Rect rect, string labelName, SerializedProperty are
if (EditorGUI.EndChangeCheck())
{
if (areaIndex >= 0 && areaIndex < areaNames.Length - 2)
areaProperty.intValue = GameObjectUtility.GetNavMeshAreaFromName(areaNames[areaIndex]);
areaProperty.intValue = NavMesh.GetAreaFromName(areaNames[areaIndex]);
else if (areaIndex == areaNames.Length - 1)
NavMeshEditorHelpers.OpenAreaSettings();
}
Expand Down
6 changes: 3 additions & 3 deletions NavMeshComponents/Scripts/NavMeshSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,20 +353,20 @@ List<NavMeshBuildSource> CollectSources(NavMeshBuilderState builderState)
{
if (m_CollectObjects == CollectObjects.All)
{
UnityEditor.AI.NavMeshBuilder.CollectSourcesInStage(
UnityEditor.AI.NavMeshEditorHelpers.CollectSourcesInStage(
null, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, gameObject.scene, sources);
}
else if (m_CollectObjects == CollectObjects.Children)
{
UnityEditor.AI.NavMeshBuilder.CollectSourcesInStage(
UnityEditor.AI.NavMeshEditorHelpers.CollectSourcesInStage(
transform, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, gameObject.scene, sources);
}
else if (m_CollectObjects == CollectObjects.Volume)
{
Matrix4x4 localToWorld = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one);
var worldBounds = GetWorldBounds(localToWorld, new Bounds(m_Center, m_Size));

UnityEditor.AI.NavMeshBuilder.CollectSourcesInStage(
UnityEditor.AI.NavMeshEditorHelpers.CollectSourcesInStage(
worldBounds, m_LayerMask, m_UseGeometry, m_DefaultArea, markups, gameObject.scene, sources);
}
for (int i = 0; i < NevMeshExtensions.Count; ++i)
Expand Down