Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

SpriteRenderer in ECS

Discussion in 'Entity Component System and C# Job system' started by jooleanlogic, Feb 8, 2019.

  1. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    164
    Is it possible to get any official word on how this is going to be implemented in future?
    Is it going to be it's own component or just a quad RenderMesh and will it be an IComponentData or a SharedComponent like RenderMesh?
     
    tiltfox likes this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    3,495
    Sprite is just a mesh with a texture.
    So I wouldn't see any reason to be treated differently, than any other 3D object in ECS.
     
  3. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    164
    Ok thanks Antypodish. I'm not well versed on the rendering side of Unity. RenderMesh is missing things like Sorting Layer and Order in Layer but I imagine they'll be addressed in the March render update. I can fudge it with z position for now anyway.
    Just glad to get rid of another hybrid component finally.
     
    Antypodish likes this.
  4. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    940
    Ooh where did they say this "The March render update"? Any roadmap plan about ECS appeared somewhere?
     
  5. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    164
    No roadmap (tiko), just this.
     
    5argon and Antypodish like this.
  6. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    308
    I made my own sprite renderer that can still use sorting layers and what not. What I did is I maintained my own mesh, then feed that mesh to GameObject that has MeshRenderer. This way, I can still make use of sorting layers and the like.

    I had that problem before and I just can't wait for Unity to provide a fix. This hack works for me, for now.
     
  7. jooleanlogic

    jooleanlogic

    Joined:
    Mar 1, 2018
    Posts:
    164
    I don't know enough about rendering to understand that but it sounds good. :)
    The point for me in using RenderMesh is to get rid of GameObject though.
    I switched to RenderMesh to test but perf took a nose dive because I lost all the batching I was getting with sprites and atlases.
    Maybe there's a work around for that but it's not pressing for me atm so I can wait and hope that Unity provides a solution before I need to.