Warning CS0618 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance. in Unity 2019.1.0f2
Hi all,
Like in the subject. After changing from 2018.1 to 2019.1.0f2 I get 8 warnings about the obsolete API. Files affected are NavMeshSurface.cs , NavMeshSurfaceEditor.cs and NavMeshPrefabInstanceEditor.cs. I have spent most of the day trying to resolve it using Unity documentation and peoples posts about it, without luck. I do not really get it how to change the code. Here are the exact warnings:
Assets\NavMesh\NavMeshComponents-master\Assets\NavMeshComponents\Editor\NavMeshSurfaceEditor.cs(114,31): warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'
Assets\NavMesh\NavMeshComponents-master\Assets\NavMeshComponents\Editor\NavMeshSurfaceEditor.cs(113,30): warning CS0618: 'PrefabUtility.GetPrefabType(Object)' is obsolete: 'Use GetPrefabAssetType and GetPrefabInstanceStatus to get the full picture about Prefab types.'
Assets\NavMesh\NavMeshComponents-master\Assets\Examples\Editor\NavMeshPrefabInstanceEditor.cs(88,26): warning CS0618: 'PrefabUtility.GetPrefabObject(Object)' is obsolete: 'Use GetPrefabInstanceHandle for Prefab instances. Handles for Prefab Assets has been discontinued.'
Any help would be appreciated.
Cheerio!!
Your answer
![](https://koobas.hobune.stream/wayback/20220612201705im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
For some reason I cannot drag my prefabs from the Project folder into the scene hierarchy. 2 Answers
Limit an amount of prefabs instantiated in javascript for Unity 5. 0 Answers
my instantiation /prefab of dan wont play death animations like orignal dan 0 Answers
how can i update the value of a variable that is in a prefab button without duplicating the prefab 0 Answers