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

How to put particle system between 2 UI elements?

Discussion in 'UGUI & TextMesh Pro' started by Orca-Chen, Aug 27, 2014.

  1. Orca-Chen

    Orca-Chen

    Joined:
    Aug 26, 2014
    Posts:
    7
    pasted_image_at_2014_08_27_06_01_pm.png
    We need to render particle between “Background" && "New Level". Now canvas render mode is "Screen Space-Camera", we only can put over whole UI or under whole UI.
    How to make it working as we expected?
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    For this you would need 2 canvas's. 1 to draw the stuff behind the particle system 1 to draw infront. This then splits the draw call up allowing for the particle systems to be in between. In the future we are hoping to have support for this without multiple canvas's
     
    karl_jones likes this.
  3. unityuserBOB

    unityuserBOB

    Joined:
    Sep 28, 2016
    Posts:
    3
    Hi Phill
    Do we have the support for the same in Unity 5.5x?
     
  4. change

    change

    Joined:
    Jul 12, 2014
    Posts:
    12
    Hi
    Any progress
    ugui with particle and other element
     
  5. maliangjian

    maliangjian

    Joined:
    May 30, 2016
    Posts:
    1
    not supported yet:(
     
  6. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    3 years after...no news about this??? it's currently one of the more anoying things in UI I think!
     
  7. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,306
    Yeah it sucks. Breaking up UI into different canvases is is not trivial. Especially when you have dynamic objects added/removed. Would be nice to add a component to a particle system, something like: UIBatchBreaker :)

    This plugin looks nice: https://www.assetstore.unity3d.com/en/#!/content/108285
    Seems like it's different than others in that it doesn't re-construct every particle into a UIVertex. Although I could be wrong.
     
    MODev likes this.
  8. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    With NGUI I was working in a system that has different cameras (2D + 3D + 2D + 3D) with different depths an layers and in the same screen I had different nested Panels assigned and it worked perfectly, rendering things in every needed camera.

    But in UGUI if I want to replicate the same behaviour I cannot because I have a parent Canvas with Screen Space Camera and my first camera assigned, but when I want to create a child canvas and change the camera to use , I have no option to do it... as canvas is not exposed in the Unity UI repo, do someone knows if I can hack this to have nested canvas rendering using different cameras????

    Is there any other easy way to solve this nasty problem?
     
  9. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hi @CDF, you are not wrong :) It doesn't generate any UIVertices for every particle. It allows just use Unity Shuriken Particle System, with fast generated special UI depth/mask buffer. It's way more efficient than generating UIVertices and much more simpler than adding multiple canvases.
    From my experience and GUI programmers from company, adding particles or any other 3D objects to GUI was... very hard. We have tried scripts from asset store and from github which generated particle vertices, but it was not so efficient (especially for mobile) or user friendly. So I decided to make UI Particle System / UI 3D-System plugins (this second is for all types of 3D objects).
     
    Last edited: Feb 23, 2018
  10. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,306
    Cool, thought so. Does your system use the hierarchy order to determine draw order? Or do you need to separate things forward and back on the z axis?
     
  11. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    It uses Z axis for sorting order. I have thought about hierarchy order but in case of 3D objects it would be hard to feel where should we put game object for models/particles (in final way you would have to still put GUI elements on different Z positions, so keeping additional hierarchy order would be additional unneeded step for user). My plugin just makes that GUI can behave, even on scene view, as 3D so setup is very intuitive. Additionally without using Z axis you wouldn't make particles flying through GUI elements with soft-particle blending like this:
     
  12. Lex_Dudya

    Lex_Dudya

    Joined:
    Feb 28, 2013
    Posts:
    29