Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question NavMeshSurface not accessible after importing package

Discussion in 'AI & Navigation Previews' started by aseelll, Aug 8, 2021.

  1. aseelll

    aseelll

    Joined:
    Dec 28, 2018
    Posts:
    2
    hi , so I'm trying to add a public NavMeshSurface variable to my class , I've imported the package and the components seem to be working just fine , and I've used the namespace UnityEngine.AI , yet the navmeshsurface component is not accessible
     
    Last edited: Aug 8, 2021
  2. mplantady_unity

    mplantady_unity

    Unity Technologies

    Joined:
    Jun 19, 2019
    Posts:
    49
    If the code where you are trying to use it is inside an Assembly Definition (AsmDef), you must add an Assembly Definition reference to Unity.AI.Navigation