From af67ed32da358082ff9229bd06974ab19c4f1ec0 Mon Sep 17 00:00:00 2001 From: Jeevan Mali <35882445+jeevanmali1994@users.noreply.github.com> Date: Fri, 17 Apr 2020 23:03:59 +0530 Subject: [PATCH] Replacing Absolute code I have replaced the absolute methods with current methods. Source:- http://forum.brackeys.com/thread/navmeshsurface-have-some-obsolete-commands/#modal_login --- Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs b/Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs index 395273f..7a7153b 100644 --- a/Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs +++ b/Assets/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs @@ -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;