Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice

How to use NavMeshQuery with Entities.ForEach().ScheduleParallel()

Discussion in 'AI & Navigation Previews' started by xzp_xzp, Mar 1, 2021.

  1. xzp_xzp

    xzp_xzp

    Joined:
    Jun 4, 2019
    Posts:
    5
    I see
    NavMeshQuery operations can be executed inside jobs (IJob, IJobParallelFor), as opposed to the operations in the NavMesh-related structures.
    in https://docs.unity3d.com/2020.2/Documentation/ScriptReference/Experimental.AI.NavMeshQuery.html
    But when I try to use it.
    I find Navmeshquery is not readyOnly in BeginFindPath UpdateFindPath.
    and it can use NativeArray<Navmeshquery> in Entities.ForEach().Only use in.Entities.Schedule();
    So how to use NavMeshQuery with Entities.ForEach().ScheduleParallel()
     
    Last edited: Mar 2, 2021