Skip to content

Commit

Permalink
hotfix error where i forgot to verify if a folder exists
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Sep 10, 2024
1 parent 62938a0 commit ae76fcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MapStation.Editor/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"depth": 0,
"source": "local",
"dependencies": {
"com.brcmapstation.common": "0.16.1",
"com.brcmapstation.common": "0.17.0",
"com.unity.timeline": "1.6.5",
"com.unity.ai.navigation": "1.0.0-exp.4",
"com.unity.postprocessing": "3.2.2"
Expand Down
4 changes: 3 additions & 1 deletion MapStation.Tools/Runtime/NavigationMeshManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ public void GenerateNavMeshes() {
builder.Build();
var scene = EditorSceneManager.GetActiveScene();
builder.Mesh.name = "CopterNavMesh";
var meshPath = Path.Combine(Path.GetDirectoryName(scene.path), Path.GetFileNameWithoutExtension(scene.path), "_Auto_CopterNavMesh.asset");
var meshDirectory = Path.Combine(Path.GetDirectoryName(scene.path), Path.GetFileNameWithoutExtension(scene.path));
var meshPath = Path.Combine(meshDirectory, "_Auto_CopterNavMesh.asset");
copterMeshCollider.sharedMesh = builder.Mesh;
Directory.CreateDirectory(meshDirectory);
AssetDatabase.CreateAsset(builder.Mesh, meshPath);
AssetDatabase.Refresh();
copterCollider.SetActive(true);
Expand Down

0 comments on commit ae76fcc

Please sign in to comment.