Search Unity

DOTS, I have a problem mixing the ECS render system and default render system

Discussion in 'Graphics for ECS' started by Rup3rt, Dec 5, 2019.

  1. Rup3rt

    Rup3rt

    Joined:
    Nov 23, 2018
    Posts:
    7
    Hi!
    I'm currently using the ECS way of rendering; RenderMesh and LocalToWorld components on the entities that I want to render. But I just come across a problem when I try to also use the default unity render system(default game objects with mesh filter and mesh renderers) on top of the ECS render system.
    This is my situation: I have a Game Object between the camera and a rendering entity

    |___|==> ...................[°°°] ....................O
    camera ................Gameobject.........Entity

    Even tho the game object is closer to the camera than the entity, the entity is drawn on top of the Game Object and not otherwise.
    I don't know if these two rendering systems are incompatible or that this undesired behaviour is a result of a mistake of my own. If you know any suggestion I would love to hear it.
    Thanks
     
  2. Rup3rt

    Rup3rt

    Joined:
    Nov 23, 2018
    Posts:
    7
    I just figured that this only occurs when the Game Object material has some transparency.
    But I can't think of the reason why it happens.
     
  3. Radu392

    Radu392

    Joined:
    Jan 6, 2016
    Posts:
    210
    Hmm that’s weird. If you’re sure that it’s not your fault (check your 2 materials renderqueue, your positioning, your layers in case you use multiple cameras and z depth etc), then you should submit a bug report. Then wait for a fix for a long time or use one of the approaches above to get around it