Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    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
unityunity