Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. 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

DOTS Navigation

Discussion in 'AI & Navigation Previews' started by Onigiri, Oct 10, 2019.

  1. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    122
    Hi! I would like to know i there any plans to make DOTS compatible pathfinding system and agent?
     
    phobos2077 and bugfinders like this.
  2. NicoFXU

    NicoFXU

    Unity Technologies

    Joined:
    Jun 25, 2016
    Posts:
    4
    We will be moving navMesh to DOTS in 2020, together with some code re-org and new features. It 's a long undertake so we do not have a delivery date yet, but work will start in January of next year.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,166
    what's the alternative if we want to do navigation in ECS?
     
  4. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    282
    There is a NavMeshQuery API, but it's limited ATM
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,166
    thanks. any examples I can quickly evaluate?
     
  6. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    282
    Here's one https://github.com/zulfajuniadi/unity-ecs-navmesh.

    Basically, for NavMeshQuery, you instantiate an instance of it from a NavMeshWorld, which you can obtain through NavMeshWorld.GetDefaultWorld(). Put the NavMeshQuery instance in a job, and call its API. The API is very incremental - you have to call, in order, BeginFindPath, UpdateFindPath (this one multiple times if needed), EndFindPath, GetPathResult, each of which returns a PathQueryStatus, which you can use to check how well the pathfinder is faring. There's more in the official API documentation. Unfortunately, GetPathResult only returns an ordered list of PolygonIds. Fortunately though, you can use https://github.com/Unity-Technologi...ressTesting/Assets/Scripts/Utils/PathUtils.cs to turn the list of PolygonIds into a list of waypoints! PathUtils is even jobifiable and burst compatible with a bit of modification. Overall, while far from complete, there is just enough code and libraries out there to achieve DOTS navigation.
     
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,917
    Even once you get the straight path it's still in 2D not on the surface, you have to use yet more low level api's to do it correctly. All told it's a lot of work to get a system working to the equivalent of the standard navigation api. Unity's own demo's don't do it all right, none of the user submitted open source stuff does it all right.

    And it doesn't handle the crowd logic, so there is that.

    Just to be informed before diving into it.
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,166
    very low level, very nice, thanks for the details
     
  9. reeseschultz

    reeseschultz

    Joined:
    Apr 1, 2018
    Posts:
    6
    Last edited: Jun 1, 2020
  10. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    583
    Hi. Any new update?
     
  11. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    339
    No update to share.
     
    optimise likes this.
  12. dansyrotyn

    dansyrotyn

    Joined:
    Oct 16, 2012
    Posts:
    4

    This is very interesting dude, thank You!
     
  13. DirectCherry

    DirectCherry

    Joined:
    May 29, 2019
    Posts:
    4
    Does anyone have any knowledge as far as how to make the path travel along the NavMesh surface rather than directly between the points?
     
    Last edited: Mar 6, 2020
  14. Plummers

    Plummers

    Joined:
    Oct 29, 2015
    Posts:
    29
    Hi, just wondering if there will be a preview package soonish or am I better off going with reeseschultz' work around? Don't want to redo a lot of work if it's due shortly.

    Many thanks, keep up the great work
     
  15. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    38
    No, there won't be any Navigation package published any time soon.
     
    Tanner555 likes this.
  16. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    122
    Sad. There are still plans for dots navmesh in the future or it's has been cancelled?
     
  17. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,166
    either the rats are leaving the ECS ship (unlikely) or something radically new and awesome is about to happen like full voxel based GPU realtime navmesh (also unlikely)
    either case stick to today's tech, we know the bugs and monobehaviors have tons of life left in them
     
    phobos2077 likes this.
  18. adriant

    adriant

    Unity Technologies

    Joined:
    Nov 1, 2016
    Posts:
    38
    We continue working on aspects of DOTS NavMesh but we don't have news to share at this point.
     
unityunity