Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

uGUI2 and Particles

Discussion in 'UGUI & TextMesh Pro' started by MvdLaar, Aug 23, 2014.

  1. MvdLaar

    MvdLaar

    Joined:
    Dec 27, 2012
    Posts:
    21
    Hi everyone,

    Used the new UI system in the past two days, and I love it - it's just what it's supposed to be.

    I am wondering one thing, though: am I missing something, or is it still not possible to draw particles on (top of) the UI layer? I tried many different things, such as world space/screen space canvases on top of the overlay canvas, sorting layers, order inside the layers... I couldn't get it to work.

    It's probably not possible, but has anyone found a fix?

    Cheers!
     
  2. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    Not tested. But since the GUI comes in its own layer, have you tried to put the particles into the UI layer too?
     
  3. MvdLaar

    MvdLaar

    Joined:
    Dec 27, 2012
    Posts:
    21
    Yeah, didn't work either. To give an example image (makes the conversation easier):

    example.png

    I need those yellow little particles to be drawn on top of the UI images.

    What I thought would be logical is to make a new sorting layer, "GUI Particles", and put that on top of the Default layer in the overview. I then made a Screen Space canvas, which I put on that GUI Particles sorting layer, and positioned the particles where I needed them. But they were still behind the UI background.
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    Hi, so mixing renderer types is not currently supported on the UI. This is due to the canvas creating a batch of all UI elements and not caring about intermediate renders in the middle of the draw list.

    This can be worked around by using render layers or multiple canvas' but it's not a nice solution.

    On our roadmap we have plans to fix this (if a renderer is detected in the middle of a canvas, stop rendering the canvas, render the renderer, then return to canvas rendering), but it won't be done for the first release.
     
  5. MvdLaar

    MvdLaar

    Joined:
    Dec 27, 2012
    Posts:
    21
    Thanks for the answer, Tim! I guess I won't bother working around it until it arrives then.

    EDIT: For those looking for that workaround; creating multiple canvas' is the easiest way. Just create a canvas on top of the existing canvas, and you're good.
     
    Last edited: Aug 23, 2014