Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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