mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
when generating navmesh in Editor tool, add navmesh data before updating it
This commit is contained in:
parent
2f6ee95a60
commit
396b0fd3a6
1 changed files with 5 additions and 4 deletions
|
@ -230,6 +230,11 @@ namespace SanAndreasUnity.Editor
|
|||
cell.transform.rotation);
|
||||
}
|
||||
|
||||
m_navMeshDataInstance = NavMesh.AddNavMeshData(m_navMeshData);
|
||||
|
||||
if (!Application.isPlaying)
|
||||
EditorSceneManager.MarkSceneDirty(cell.gameObject.scene);
|
||||
|
||||
var asyncOperation = NavMeshBuilder.UpdateNavMeshDataAsync(
|
||||
m_navMeshData,
|
||||
navMeshBuildSettings,
|
||||
|
@ -256,10 +261,6 @@ namespace SanAndreasUnity.Editor
|
|||
yield break;
|
||||
}
|
||||
|
||||
m_navMeshDataInstance = NavMesh.AddNavMeshData(m_navMeshData);
|
||||
if (!Application.isPlaying)
|
||||
EditorSceneManager.MarkSceneDirty(cell.gameObject.scene);
|
||||
|
||||
EditorUtility.ClearProgressBar();
|
||||
EditorUtility.DisplayDialog("", "Nav mesh generation complete !", "Ok");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue