#does com.unity.ai.navigation support com.unity.physics and dots?

1 messages · Page 1 of 1 (latest)

dire burrow
#

I hope to use com.unity.physics in dots and com.unity.ai.navigation for navigation.
I would like to ask if com.unity.ai.navigation is compatible with com.unity.physics in unity dots environment?

mint sinew
#

they work fully agnostic of each other

dire burrow
#

I have some doubts

Whether the plane object should be placed in the scene or subscene?
Then should the plane be mounted with a collider or a physics shape && physics body?

I tried just mounting the physics body, but it didn't work

mint sinew
#

but aside from that

#

they function completely separately

#

all this lib does is just feed navmesh input data, interpreted from physics shapes

dire burrow
#

Thank you. I will study it. Is there any more detailed tutorial?

mint sinew
dire burrow
#

great

dire burrow
#

Is there any EntitiesNavMeshBuilder test project that can be fully run?

I am a newbie in Unity and want to learn。

mint sinew
dire burrow
#

goot, i will learn it .

#

thanks

unborn glen
#

might as well write your own engine 😂

dire burrow
#

i got some error by EntitiesNavMeshBuilder module.

RuntimeNavMeshBuilder. Source Mesh missing at index: 0
UnityEngine.AI.NavMeshBuilder:UpdateNavMeshDataAsync (UnityEngine.AI.NavMeshData,UnityEngine.AI.NavMeshBuildSettings,System.Collections.Generic.List`1<UnityEngine.AI.NavMeshBuildSource>,UnityEngine.Bounds)
EntitiesNavMeshBuilder.Systems.NavMeshBuilderSystem:OnUpdate () (at ./Library/PackageCache/com.bustedbunny.entitiesnavmeshbuilder@1ba4478d7c/Runtime/Systems/NavMeshBuilderSystem.cs:114)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:739)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:697)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:739)

Is there anything that needs extra attention?

mint sinew
#

your mesh is null

dire burrow
#

Where exactly do you set the mesh?
I set it up according to GameMap->Terrain in rtsdemo

mint sinew
#

I don't remember tbf

#

ah

#

looks like you have multiple submeshes

#

don't think I added any support to that

#

best use colliders

#

they are likely to have least errors

dire burrow
#

What I am imitating is this component in rtsdemo. It seems to exist in my code.

#

I think I found the problem,
The terrain I set is static, so an error is reported. Once the static attribute is removed, it will be normal.

dire burrow
#

@issue i try to use code

    EntityManager.SetComponentEnabled<Pathfinder>(entity, true);  

to set Pathfinder enable.
but it will disable automatically. What's the problem here?

#

and sometimes I will get some errors

System.ArgumentException: The start location doesn't belong to any active NavMesh surface.start
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007fffd97f9395 (2fd9973554be487deb762003d629315) UnityEngine.Experimental.AI.NavMeshQuery.BeginFindPath (at C:/game/project/War3/Library/PackageCache/com.unity.burst@1.8.10/.Runtime/unknown/unknown:0)
0x00007fffd97f4ae7 (2fd9973554be487deb762003d629315) Pathfinding.Systems.PathfinderSystem.ProcessQueues.Process (at C:/game/project/War3/Library/PackageCache/com.unity.burst@1.8.10/.Runtime/Library/PackageCache/com.bustedbunny.pathfinding@3b93fd6044/Runtime/Systems/PathfinderSystem.cs:215)
0x00007fffd97f8cc7 (2fd9973554be487deb762003d629315) Unity.Jobs.IJobForExtensions.ForJobStruct`1<Pathfinding.Systems.PathfinderSystem.ProcessQueues>.Execute(ref Pathfinding.Systems.PathfinderSystem.ProcessQueues jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_79c8a10d7c43a903cc3bc3eb2d78e4f0 from UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null (at C:/game/project/War3/Library/PackageCache/com.unity.burst@1.8.10/.Runtime/unknown/unknown:0)
0x00007fffd97f3086 (2fd9973554be487deb762003d629315) fd0ea727036fca51a2a2eda404f4beb8
dire burrow
placid minnow
#

@mint sinew hello chief, thank you for making ur code public. How can I add new entities at runtime and have them carve the navmesh? I get error when adding new entities with EntityManager or command buffer "RuntimeNavMeshBuilder. Unknown source type: 17" OR " Source Mesh missing at index: ". Do I need to somehow add the new meshses before the systems run? All the new Entities are prefabs that have the navmesh authoring component

mint sinew
#

show full stacktrace

placid minnow
#

@mint sinew
RuntimeNavMeshBuilder. Source Mesh missing at index: 7
UnityEngine.AI.NavMeshBuilder:UpdateNavMeshDataAsync (UnityEngine.AI.NavMeshData,UnityEngine.AI.NavMeshBuildSettings,System.Collections.Generic.List`1<UnityEngine.AI.NavMeshBuildSource>,UnityEngine.Bounds)
EntitiesNavMeshBuilder.Systems.NavMeshBuilderSystem:OnUpdate () (at Assets/_KDREAMS/EntitiesNavMeshBuilder-main/Runtime/Systems/NavMeshBuilderSystem.cs:113)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:739)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:697)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:739)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ComponentSystemGroup.cs:697)
Unity.Entities.SystemBase:Update () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/SystemBase.cs:418)
Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/ScriptBehaviourUpdateOrder.cs:526)

#

this is after instantiating Entity with Entity manager. The Entity comes from prefab that has Nav Mesh Authoring component with Type of Mesh. The order of the system running doesn't make a difference or using a command buffer

            var newEntity        = EntityManager.Instantiate( buyMenuSingleton[ _indexToUseFromBuyMenu ].BuyMenuItems ) ;
            EntityManager.SetComponentData( newEntity , LocalTransform.FromPosition( new float3( 5,0,5 ) ) ) ;```
#

if I just continue the scene after the error the object DOES appear and DOES carve the navmesh as expected

mint sinew
#

looks like some of your entities are invalid

#

idk for sure what's wrong though

#

maybe mesh specified is null