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 have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

UI and particles

Discussion in 'UGUI & TextMesh Pro' started by vitali15, Mar 31, 2020.

  1. vitali15

    vitali15

    Joined:
    Jan 9, 2014
    Posts:
    4
    Hello unity experts.

    I'm trying to put particles between 2 UI elements.
    And as for now i can put particles behind UI or before ui but not between.
    Structure should look like :
    Canvas
    Button 1
    Particle
    Button 2

    So Particles should be on top of Button 1 but behind Button 2. Any suggestions how to achieve it?
    I found this thread but it's not clear and not very useful:
    https://answers.unity.com/questions...68.1883020453.1585260470-516387896.1582926210

    Step by step guidance would be very helpful.
     
  2. vitali15

    vitali15

    Joined:
    Jan 9, 2014
    Posts:
    4
    Solution. Not perfect but workable.
    -Camera1
    -Canvas1 (Order in layer = 0, Render mode = Screen Space-Camera, Render Camera = ---Camera1)
    --Image1
    --Particles
    --Canvas2 - (Override Sorting, order in layer = 2)
    ---Image2

    Can't consider it as a 'perfect'. believe Unity team should do it without any 'tricks'
     
  3. Deankovitch

    Deankovitch

    Joined:
    Sep 28, 2012
    Posts:
    31
    Hi there,

    I created the Canvas Particle System, an asset that can create UI particles fully compatible with Unity's UI Render Pipeline.

    Within this asset you can:

    • Use sibling index to control particles z position
    • Add particles in front, behind, or between any UI element
    • Emit particles from: point, directional, line, rect, and circular or using any recttransform in the scene
    • Works on all canvas types:
    • Works on all platforms: mobile, desktop, or console
    • Control all emitter attributes programmatically
    • Animate any emitter or particle attributes
    • Add multi-texture particles
    • Particles with animates sprites
    • Emit particles from images
    • Use UI masks
    • Emit from local or world spaces
    • Render Shuriken particle on UI
    • And more
    https://assetstore.unity.com/packages/tools/particles-effects/canvas-particle-system-64134