Skip to content
Open
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
4 changes: 2 additions & 2 deletions Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ static void CreateNavMeshAsset(NavMeshSurface surface)

static NavMeshData GetNavMeshAssetToDelete(NavMeshSurface navSurface)
{
var prefabType = PrefabUtility.GetPrefabType(navSurface);
if (prefabType == PrefabType.PrefabInstance || prefabType == PrefabType.DisconnectedPrefabInstance)
var prefabType = PrefabUtility.GetPrefabAssetType(navSurface);
if (prefabType != PrefabAssetType.NotAPrefab)
{
// Don't allow deleting the asset belonging to the prefab parent
var parentSurface = PrefabUtility.GetPrefabParent(navSurface) as NavMeshSurface;
Expand Down