Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    116
    Does this package support Entities?
     
  2. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    @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:
    393
    @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. Frais254

    Frais254

    Joined:
    Oct 26, 2014
    Posts:
    168
    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:
    393
    That worked perfectly, thanks.
     
    Frais254 likes this.
  7. jeroll3d

    jeroll3d

    Joined:
    Nov 6, 2010
    Posts:
    249
    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
     
    andywatts and EWimsett like this.
  9. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    116
    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:
    14
    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:
    69
    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,133
    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:
    205
    But wasn't navmesh query the only thing for navigation in DOTS?
     
  16. Lukas_Ch

    Lukas_Ch

    Joined:
    Oct 12, 2014
    Posts:
    79
    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,709
    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
     
    Frais254 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:
    116
    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:
    205
    Yeah, there was, and it was deprecated just recently. Genius move right?

     
    joshrs926 likes this.
  21. joshrs926

    joshrs926

    Joined:
    Jan 31, 2021
    Posts:
    116
    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.
     
    Frais254 and EWimsett like this.
  22. smritichopra3

    smritichopra3

    Joined:
    Feb 5, 2020
    Posts:
    12
    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?
     
    Frais254 and EWimsett like this.
  23. JaredBGreat

    JaredBGreat

    Joined:
    Oct 28, 2017
    Posts:
    18
    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.
     
    Frais254 likes this.
  24. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    427
    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
    Frais254, DwinTeimlon and Saniell like this.
  25. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,434
    Navmesh setter - when?
     
    Tudoh92 and Saniell like this.
  26. DwinTeimlon

    DwinTeimlon

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

    Frais254

    Joined:
    Oct 26, 2014
    Posts:
    168
    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:
    47
    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:
    234
    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
     
    retired_unity_saga likes this.
  30. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    69
    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. Deleted User

    Deleted User

    Guest

    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:
    234
    @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
  33. Lukas_Ch

    Lukas_Ch

    Joined:
    Oct 12, 2014
    Posts:
    79
    I completely understand your perspective, and I don't want to delve into a discussion on the value provided by the asset store versus developer time, as my opinion is quite biased on this topic. What I want to emphasize is that Unity has limited resources that they can allocate to features. If they focus on high-level features, there is a high chance that you may not be part of the target audience. Additionally, this could hinder the possibility of developing your own alternatives due to a lack of low-level API (With removal of UnityEngine.Experimental.AI it will be even more lower).

    Due to the lack of response from Unity regarding concerns about this, I will assume that there won't be a change of stance. We might anticipate the removal of these APIs without a replacement in Unity 2024 (or Unity 6). It's important to understand that this decision could potentially impact the adoption rate of your packages. I would appreciate insights into the motivation behind this decision. Currently, my package, 'Agents Navigation,' has a dependency on 'com.unity.ai.navigation' and has attracted thousands of developers over the past year. Without 'UnityEngine.Experimental.AI' or an alternative, I anticipate having to remove the usage of 'com.unity.ai.navigation.'

    By the way, I apologize if my message came across as offensive or repetitive. My intention is to express my concern about what I perceive as a downplaying of the importance of this API removal without replacement (Which is seems to be a pattern in Unity).
     
    Last edited: Nov 19, 2023
    apkdev, NikolaNikolov, Sluggy and 5 others like this.
  34. Arathorn_J

    Arathorn_J

    Joined:
    Jan 13, 2018
    Posts:
    51
    Experiment.AI package was the only way to grab points on the navmesh inside the job system, with it now being deprecated we will be forced to do this on the main thread which becomes a terrible bottleneck for a game with lots of NPCs and units. Very shocked it was deprecated without any hope for a replacement?
     
    retired_unity_saga likes this.
  35. retired_unity_saga

    retired_unity_saga

    Joined:
    Sep 17, 2016
    Posts:
    290
    I am really not sure how to think about this.

    Also:

    Does this now mean, previous pathing packages that reference DOTS code to some extent are now completely non-functioning within 2023.2.1 dev ecosystem?
    Hmmm... OK.

    Pathfinding is a super critical functional part of any/every video game since MS-DOS.
    Can we get this package open-sourced? It isn't wholesome development to worry about key functionality simply vanishing into thin air, especially when performance may take dive.

    The entire Unity community should be leveraged. Many of them are 30+ year dev vets with ample time on their hands to contribute towards enhanced user experience.
     
    Frais254 likes this.
  36. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    482
    I feel like I have absolutely no idea what the current plan for Navigation is. Doesn't seem like it was mentioned at Unite.
     
  37. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    69
    Just to clarify, 'UnityEngine.Experimental.AI' remains available, albeit deprecated, in Unity 6, which is the first LTS version where we introduce this change.

    Most of the Navigation functionality is implemented in C++ in the "native" part of the engine, and not in the "AI Navigation" package. Both the native code and the package code will continue to abide by Unity's source policy (e.g. the Unity Companion License for the package).
     
    retired_unity_saga likes this.
  38. Frais254

    Frais254

    Joined:
    Oct 26, 2014
    Posts:
    168
    Thanks for the information! So does deprecated only mean its no longer supported with updates? It will still work fine in Unity 6?
     
    retired_unity_saga likes this.
  39. Arathorn_J

    Arathorn_J

    Joined:
    Jan 13, 2018
    Posts:
    51
  40. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    I think the earlier statement from @adriant makes it quite clear, that nobody is currently working on AI.Navigation stuff at Unity.

     
  41. Arathorn_J

    Arathorn_J

    Joined:
    Jan 13, 2018
    Posts:
    51
    Oh aye, in reference to the Experimental.AI not the AI.Navigation package which is still getting updates, but there is roadmap or intention update regards the AI.Navigation package features or improvements.
     
  42. chriscode

    chriscode

    Joined:
    Mar 2, 2015
    Posts:
    49
    impheris and laurentlavigne like this.
  43. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,709
  44. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    131
    how about performance? better or worse than the legacy Ai system?
     
  45. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,709
    where are the links?
     
  46. klima_de_sa

    klima_de_sa

    Joined:
    Feb 16, 2017
    Posts:
    3
    Well I'm having a frustrating problem with the new navmesh system. I create a new project, add a navmesh, commit it to a github repo. on another machine, all versions the same, package installed, I have no navmesh surface component,
    And evidently, it is because I can't load an icon:

    Unable to load the icon: 'Packages/com.unity.ai.navigation/EditorResources/NavigationWindowIcon.png'.
    Note that either full project path should be used (with extension) or just the icon name if the icon is located in the following location: 'Assets/Editor Default Resources/Icons/' (without extension, since png is assumed)
    UnityEditor.EditorGUIUtility:TrTextContentWithIcon (string,string)
    Unity.AI.Navigation.Editor.NavigationWindow:OnEnable () (at ./Library/PackageCache/com.unity.ai.navigation@1.1.5/Editor/NavigationWindow.cs:108)
    UnityEditor.EditorWindow:GetWindow<Unity.AI.Navigation.Editor.NavigationWindow> ()
    Unity.AI.Navigation.Editor.NavigationWindow:SetupWindow () (at ./Library/PackageCache/com.unity.ai.navigation@1.1.5/Editor/NavigationWindow.cs:67)

    Any ideas?
     
  47. EWimsett

    EWimsett

    Joined:
    Feb 16, 2017
    Posts:
    14
    Has anybody here tried modifying NavMeshBuildSettings to dynamically adjust their agent types during runtime? I can only get a copy of the class and cannot set the NavMeshBuildSettings for the agent type itself. Confusing as there is a NavMesh.CreateSettings() method to create a new agent type during runtime, but I can only use its default settings, which seems a bit useless. I hope I've missed something...
     
    Last edited: May 8, 2024