开发者

Show the Unity particle on the Canvas

开发者 https://www.devze.com 2022-12-07 17:27 出处:网络
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 s开发者_StackOverflowhow particle on the canvas when the render mode on the canv

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 s开发者_StackOverflowhow 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消