Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

[Solved]For some reason, Entities are not using Hybrid renderer

Discussion in 'Graphics for ECS' started by carcasanchez, Feb 20, 2020.

  1. carcasanchez

    carcasanchez

    Joined:
    Jul 15, 2018
    Posts:
    177
    Hello, fellow Uniters.
    I am experimenting a little bit with ECS, and I managed to create a simple spawn system. It spawn a rather complex prefab (a humanoid figure with quads as childs, used for impostor works): upload_2020-2-20_12-49-38.png

    I spawned around 900 of this impostors, and the fps where around 80 (comparing with the 20 fps gameobjects where giving me with the same amount, that is a win!). However, there is a pair of things that are still bugging me:
    -First, to convert the prefab to entity, I have to have a gameobject in scene that, via code, i procede to conver to entity and delete. If I just assign the prefab from the explorer, the entities are created, but not rendered.
    -Second, if I deactivate the RenderMeshSystemV2 from the Entity debugger (as I have read from forums), the meshes continue to get drawn.
    upload_2020-2-20_12-54-15.png
    I highly suspect that these two issues are related (maybe I am doing the instances wrong), but none the tutorials and documentation I have read had given me a glimpse of what I am doing incorrectly.
     
  2. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    530
    RenderMeshSystemV2 doesn't clean batches when getting disabled.
    Try disabling it before creating your objects.
     
  3. carcasanchez

    carcasanchez

    Joined:
    Jul 15, 2018
    Posts:
    177
    Well, you have got something.