Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

[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:
    522
    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.