Search Unity

NavMesh help

Discussion in '2D' started by cai_1234, Oct 26, 2016.

  1. cai_1234

    cai_1234

    Joined:
    Aug 2, 2016
    Posts:
    4
    Hello. I have been working on a personal project and i am currently making the enemy AI (or at least some of it). I am using this tutorial: https://unity3d.com/learn/tutorials/topics/scripting/using-interfaces-make-state-machine-ai and have come across a problem. The console says ""GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh." I my enemy GameObject has a Nav Mesh Agent attached to it, and I have baked all static components, which another tutorial told me to do. Bellow is a code snipped of my IdleState for my state machine. What should I do? (or should i post this somewhere else?) Thanks for any and all help.