Home > OS >  Show the Unity particle on the Canvas
Show the Unity particle on the Canvas

Time:12-07

I am using Unity version 2021.3.15f I want to show the particles on the UI canvas. I'd like to know two things, how to show particle on the canvas when the render mode on the canvas is screenspace-overlay and screenspace-camera. Do I need to convert the particle's transform into a rectTransform? Or should I use methods like Camera.ScreenToWorldPosition?

CodePudding user response:

You could always move the camera into a ScreenToWorldPosition and it will work but keep in mind this is just a bandaid fix and won't be robust and maintainable. Usually anything ui related must be compatible with Unity's UI Render Pipeline.

There is this great resource for adding particle effects into UGUI from a github repository.

CodePudding user response:

Use : https://github.com/mob-sakai/ParticleEffectForUGUI take a look at the sample scenes it has everything you need.

  • Related