Search Unity

Navmesh updating with entities

Discussion in 'Entity Component System' started by Init33, Jul 15, 2019.

  1. Init33

    Init33

    Joined:
    Aug 30, 2017
    Posts:
    67
    I have been trying to move a NavMeshBuilder script to my ECS project and am having trouble. The idea is when I drop a gameObject with the appropriate tag into the scene and then update my NavMesh from script, I can see the navmesh has updated fine. However if I do this using a Entity that was created from the same gameObject using the
    IDeclareReferencedPrefabs, IConvertGameObjectToEntity
    tags and update the mesh, it doesn't detect those entities when building the navmesh.

    Are entities converted from game objects on Layers just like gameObjects?
    When I do a
    NavMeshCollectGeometry.RenderMeshes
    does this grab the geometry of entities?
    Any other tips?