C
C#•7mo ago
Jaredare

Updated from 2021 to 2022 version of unity, getting NavMeshSurface related error.

Hey y'all, I'm an absolute newbie trying to make a basic game and figured the unity tutorials would be a good place to start. I've had to go out of my way to get an outdated version of unity to access the microgame the tutorial recommends and then updated to a more recent version that has WebGL Project support to learn that but when I did I started getting this error. Assets\FPS\Tutorials\TutorialCallbacks.cs(15,9): error CS0246: The type or namespace name 'NavMeshSurface' could not be found (are you missing a using directive or an assembly reference?) I've looked into the file it's referencing and checked a couple forum posts from a while ago but am lacking fundamental c# understanding and experience for this and don't know which part I need to know about. It seems to me that the highlighted portion of the screenshot is what is being referenced here.
No description
5 Replies
Jaredare
Jaredare•7mo ago
Could someone tell me approximately how specific this sort of thing is? From what I gathered it seemed like a fundamental c# thing, but if it's specific to unity or even working with navigation meshes in unity that would be really helpful.
SinFluxx
SinFluxx•7mo ago
Have you tried these steps? https://docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/index.html (I don't know for sure just a brief search)
Jaredare
Jaredare•7mo ago
All good, I appreciate any help I can get. I'll check really quick. 😄 I believe that's an earlier version of something that has since been integrated into Unity. I think the problem may arise from (this is speculation) an early version of this being used in the example I was working on and then using slightly different values or parameters in the newer version that is just a part of Unity at this point. I got an idea, one second.
SinFluxx
SinFluxx•7mo ago
Yeah that's what I was seeing, it then sounded like it's now part of that package I linked above
Jaredare
Jaredare•7mo ago
I found a post in the unity discord saying essentially that the problem was having using UnityEngine.AI; instead of using Unity.AI.Navigation;. Apparently in the version changes they changed the terminology a bit and I didn't realize. Thank you a bunch for your help man 🙂 I also deleted NavMeshSurface from my assets with hopes of reimporting it but I guess because AI Navigation is it's own package now it just used that.