Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Navigation/Navmesh - Failed to create agent because it is not close enough to the Navmesh

Discussion in 'Documentation' started by phxtr, Oct 21, 2017.

  1. phxtr

    phxtr

    Joined:
    Jul 8, 2017
    Posts:
    1
    I had a working project, and made some customization and all of a sudden started getting the above error.

    I lost nearly a whole day troubleshooting this issue, rebaking the navmesh, redoing the agent settings, adding debug code, reading pages and pages of unity docs, as well as google results, etc. etc. Only to find out the error was 'expected'.

    I finally got lucky and found the solution in this thread here:
    https://forum.unity.com/threads/cas...nt-type-causes-failed-to-create-agent.485847/

    The 'problem' was that I had added a new agent type. The procedure/interface was just like adding a new type for everything else (tags, layers, etc), so I never realized additional steps were required to make a new agent type work.

    Nothing in the documentation stated that the standard Navmesh is ONLY for the 'Humanoid' agent, and that adding a new type requires extra procedures.

    Could you modify the Navigation pages to mention this fact? Somewhere in the more general sections that people are more likely to see, and not buried somewhere preferably, 8^).

    Would possibly save a lot of people a lot of headache and lost time troubleshooting something that could be avoided with a quick mention in the documentation.
     
  2. trinistry

    trinistry

    Joined:
    Feb 2, 2014
    Posts:
    1
    The internet needs more heroes like you! Thank you for posting that here. There is no indication what so ever, why the agent would refuse to be on a NavMesh, when it is a custom agent type.
     
    Berillium and Frable like this.
  3. Frable

    Frable

    Joined:
    Nov 14, 2014
    Posts:
    1
    @phxtr Huge thank you from my side as well.
    Ran into the exact same issue and of course wasted lot of time to recheck various aspects.
    Never imagined that this might be the root cause for the problem.
    Changing to the default "humanoid" agent type made it work without a hitch.
     
    Berillium likes this.
  4. Meany747

    Meany747

    Joined:
    Jun 13, 2017
    Posts:
    1
    Massive thank you here as well, this is fairly poorly noted.