Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Visual Studio doesn't recognise NavMeshAgent variable

Discussion in 'Navigation' started by Nepholius, Sep 1, 2020.

  1. Nepholius

    Nepholius

    Joined:
    Aug 10, 2020
    Posts:
    2
    Hey everyone, first of all I'm a newbie in Unity. I have been learning Unity Game developing for a while. Then, I got this issue which I still cannot find out how to resolve it. When the NavMeshAgent variable is supposed to be in green color, it stays the same as normal texts. And unity doesn't accept this way. Thus, it doesn't work. I'll leave a screenshot to make my self clear. Hope you guys can help me because I googled it in many forums including here but i couldn't have solved yet. Thanks in advance.
    Note: the version that I currently use is Unity 2019.4.7f
     
  2. Nepholius

    Nepholius

    Joined:
    Aug 10, 2020
    Posts:
    2
  3. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    984
  4. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,823
    Your script is not recognized as a MonoBehaviour; this is why VS doesn't acknowledge NavMeshAgent.
     
unityunity