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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Official There's a new Navigation package in town!

Discussion in 'Navigation' started by UnityChinny, Dec 8, 2022.

  1. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    108
    Does this package support Entities?
     
  2. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    296
    @ChinnyBJ I hope you are still at Unity.

    Can you please tell us if the massive layoffs will affect the development of the new navigation package? Thanks.
     
    Last edited: May 11, 2023
  3. Khrimm

    Khrimm

    Joined:
    Jun 10, 2020
    Posts:
    1
    This really is a huge problem. I am facing the same problem at the moment. My agents are just running/clipping through all the terrain trees. And there is nothing i could do to get the navmesh to work..

    My player character collides with the trees, so the Tree Colliders seem to be set up correctly.

    Does someone know a solution to that problem?
     
  4. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    392
    @ChinnyBJ Thank you for this update, I am happy to see Unity's new modular design paying off and resulting in smaller build when unnecessary functionality is not forced into the build because of the new package system.

    However, I am having a problem, I am on 2022.2.12, fresh project, imported the navigation package, and opened the new 'navigation' window, not the legacy one, but I can't find an option to bake in it.

    upload_2023-5-24_16-13-30.png

    It's funny because the documentation mentions to use the obsolete window to bake.

    upload_2023-5-24_16-12-48.png
     
  5. Vincent454

    Vincent454

    Joined:
    Oct 26, 2014
    Posts:
    163
    You need to use a gameobject with a navmesh surface component on it, that is the only way with the new package I think
     
    Stranger-Games likes this.
  6. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    392
    That worked perfectly, thanks.
     
    Vincent454 likes this.
  7. jeroll3d

    jeroll3d

    Joined:
    Nov 6, 2010
    Posts:
    239
    I was lost, now...im im PANIC :D
     
  8. tfritzy

    tfritzy

    Joined:
    Nov 24, 2015
    Posts:
    2
    Super annoying that NavMeshSurface is in the wrong namespace
     
    EWimsett likes this.
  9. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    108
    Does anyone know of this package would work well in an ECS heavy project? It seems like it relies on GameObjects so I assume the answer is no.
     
  10. EWimsett

    EWimsett

    Joined:
    Feb 16, 2017
    Posts:
    9
    Has anyone had any success generating bidirectional links with the NavMeshSurface component? They only seem to work in a single direction and I would like to change that, however when I check the documentation I get a "Sorry this page seems to be missing!".

    https://docs.unity3d.com/Packages/c...1/manual/BuildingOffMeshLinksAutomatically.md
    https://docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/manual/CreateOffMeshLink.html

    Edit: after a googling I found out you can't traverse upwards. Having the same flexibility of manually created links is a feature request. Thanks.
     
    Last edited: Aug 7, 2023
  11. Arfus

    Arfus

    Joined:
    Mar 12, 2013
    Posts:
    29
    So, with the deprecation of everything in UnityEngine.Experimental.AI is there a replacement on the horizon soon? NavMeshQuery was extremely useful and starting from 2023.2.0a22+ it's no longer available for use.
     
    BreakingPointDev and Arathorn_J like this.
  12. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    64
    Until further notice, Unity will not release any replacement for the API in `UnityEngine.Experimental.AI`.
    Please note that those experimental structs have been deprecated in 2023.2, but they haven't been removed yet. You can still use them unchanged with what will become the 2023.2 and LTS releases. Also please be aware that they have limitations and issues that Unity will not address going forward. We recommend you evaluate carefully whether their capabilities, in their current form, match all the needs of your projects.
     
    optimise likes this.
  13. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,041
    Is that official currently working on dots navigation and current navigation system will be deprecated soon?
     
  14. Arfus

    Arfus

    Joined:
    Mar 12, 2013
    Posts:
    29
    Thanks for the response, I stand corrected regarding the removal remark. However this still doesn't answer my initial question where I've asked if a replacement of those experimental functions will be added. Do you happen to know the answer to that?
     
  15. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    168
    But wasn't navmesh query the only thing for navigation in DOTS?
     
  16. Lukas_Ch

    Lukas_Ch

    Joined:
    Oct 12, 2014
    Posts:
    70
    Hey,
    This is a super interesting topic, and I hope my opinions won't offend anybody. I'd love to share my perspective.
    First of all, it's really great to see navigation getting more attention, especially with the increased control over the NavMesh building process. I've noticed users creating many cool extensions out of it, like this one: https://github.com/h8man/NavMeshPlus.

    @laurentlavigne's comment might come across as a bit harsh, but I do share a similar sentiment with him. "Improved Collision Avoidance" and "Navigation authoring UX & workflow improvements" seem to fall more into the "nice to have" category. Both of these can already be addressed at the user level, and the asset store offers good solutions for them (of course, as a publisher, my perspective might be seen as biased). However, working on the low-level navmesh side is a true roadblock, at least in my opinion, and probably for others as well. For this reason, I would love to see the roadmap focus more on providing extensible groundwork, rather than trying to tackle specific use cases.

    To be honest, I'm quite concerned about this. I understand that the API was never intended to be available as a proper API interaction with the NavMesh in a Burst-compatible way. However, this decision could potentially impact the adoption of Unity's nav mesh in data-oriented projects. As a matter of fact, I know that I might have to remove Unity nav mesh integration from my packages going forward in 2024. I'm curious to know the main reasoning behind this decision. Perhaps the API can be left as is, with clear communication that it won't be extended, in order to save development time on your side and ultimately removed once replacement API is set.

    P.S. I am creator of Agents Navigation and Local Avoidance.
     
    Last edited: Aug 20, 2023
  17. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,516
    i'm not sure if i fully understand this but, in this case, the asset store should be a place for alternatives, not the only solution, because they costs money, money that many devs (including me) do not have, do not forget that releasing a game is not exactly free either
     
    Vincent454 likes this.
  18. ninetailgt

    ninetailgt

    Joined:
    Sep 6, 2022
    Posts:
    1
    I am using Unity 2022.3.3f1, I install AI Navigation and these error show up. Can someone help me fix this! upload_2023-8-29_2-48-7.png
     
  19. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    108
    Does this package work with Entities? Is there lower level API that can be used with entities?
     
  20. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    168
    Yeah, there was, and it was deprecated just recently. Genius move right?

     
    joshrs926 likes this.
  21. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    108
    I’m sorry to hear that. I think a good way to design a package is to design some lower level APIs that are public that you then build the higher level APIs and the UX and quality of life features on. Then the average user can use the higher level APIs and then users with advanced use cases are free to use the lower level APIs. I believe the Splines package was designed this way.
     
    Vincent454 and EWimsett like this.
  22. smritichopra3

    smritichopra3

    Joined:
    Feb 5, 2020
    Posts:
    1
    This is frankly quite baffling! The problem of not having bidirectional autogenerated drop down links has been around for AGES, and now even with the new package we don't have a solution for this? How can something so rudimentary be taking this long? Especially if the functionality exists under the hood for manual links, and simply needs exposing?
     
    Vincent454 and EWimsett like this.
  23. JaredBGreat

    JaredBGreat

    Joined:
    Oct 28, 2017
    Posts:
    13
    The documentation needs to be include scripting API's for dynamic navmesh generation / updating -- that is a feature, I hope (if not then it looks like 2021 and before was better, even if you did need an experimental package to use it). Really, any game that has features like base-building, modifiable or destructable geometry, procedural geometry, etc., needs that. I only see documentation for the easy stuff I could probably figure out mostly on my own, and not for features that need it because "you just have to know." Where is the scripting API?

    I guess I'll be sticking with 2021 -- I just need to find the instructions to install that experimental package again.
     
    Vincent454 likes this.
  24. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    400
    Hi, I also would like to be able to edit the nav mesh via script. We should be able to, say, delete faces. A good example of were we could use this are islands, you know, those places inside objects that are unreachable (well in reallity the baking should auto delete non-reachable, non-connected, enclosed islands by default).
    Also, please allow suscription to nav baking, so that we can inject logic before and after baking the nav mesh.
     
    Last edited: Oct 20, 2023
    Vincent454, DwinTeimlon and Saniell like this.
  25. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,996
    Navmesh setter - when?
     
    Saniell likes this.
  26. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    296
    Never, nobody is working on this is my current guess.
     
  27. Vincent454

    Vincent454

    Joined:
    Oct 26, 2014
    Posts:
    163
    Can you elaborate what potential issues/bugs they have, in case we do choose to use them in our project?
     
  28. FileThirteen

    FileThirteen

    Joined:
    Oct 23, 2012
    Posts:
    40
    I'm working in 2022.3.11f1 and installing the AI Navigation 1.1.5 package produces errors:
    upload_2023-10-26_15-38-59.png

    I see someone else was running into a similar problem. Anyone know of a fix for this?
    I had run into a similar issue with I think the 2D animation package in another version of Unity and there I had to open up the manifest.json and just reduce the version. Dunno if the same will work here.

    Edit:
    According to the documentation: https://docs.unity3d.com/2022.3/Documentation/Manual/com.unity.ai.navigation.html version 1.1.5 should work for unity 2022.3, and the package manager only lets us use that version, but in fact modifying the version in the manifest.json to 1.1.1 does resolve the issue. Kind of wish I could select versions from the package manager itself seeing as there is a pattern emerging here.
     
  29. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    202
    The nav mesh solution really fails when scaling game objects with a navmesh surface down.

    We got a whole level that we have to scale down because its AR / VR.
    And we have the nav mesh agent values on the minium 0.05 for agent size etc.
    But still it cant properly make a surface.

    Is there any solution planned?
    Like making it work with any scale like a tesselation factor for the ai surface
     
  30. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    64
    For AR/VR/XR application it is best and recommended to scale the camera and not the content. Physics, particles and other systems can also have glitches when objects are scaled down a lot.
    We don't plan to change anything about how the NavMesh builder handles very small objects.
    Please have a look at this (older) blog post and the related video as they might provide useful insight into how to deal with scale.
     
  31. OutDoorsScene

    OutDoorsScene

    Joined:
    Sep 9, 2022
    Posts:
    155
    It seems like the roadmap “Progressive Rearchitecture” has been put on hold.

    What other options do we have for building AI with navigation at a massive scale?
     
  32. DavidZobrist

    DavidZobrist

    Joined:
    Sep 3, 2017
    Posts:
    202
    @adriant
    How would you scale the camera the FOV is set by pico / oculus etc and just scaling the camera has no effect ( or one eye renderes differently than the other)

    for now we just dont use unitys nav mesh then, particles and other stuff works fine
     
    Last edited: Nov 14, 2023 at 2:15 PM