How to show a Trail Renderer over a Canvas?

An empty scene with a canvas setup as World Space which has two GameObjects inside it.
First, a Raw Image that acts as a background image.
Second, an Image that has the Trail Renderer component.

I have searched and tried several stuff like what is explained on the link below but it has not worked. unity - How to render line renderer or trail renderer above UI canvas - Game Development Stack Exchange

What are my available options?
I also tried creating a GameObject outside the Canvas and attach it a Trail Renderer but it gives the same results as the image shows.

I was not sure if this issue should be posted on the UI or Graphics section but I went with the Graphics one so sorry if this is not the adequate section.

Seems that the answer was as easy as just setting a material to the Trail Renderer.
No idea why this enforces that the render is now over the canvas but it works.
The canvas cannot be in Overlay mode.

And in builds, did the trail still appear?

I am facing the same problem, the trail renderer not become visible over UI elements.
I have applied material too but it remain behind all UI objects.

Please suggest any other solution for this.

Use a GUI Particle extension like this: https://github.com/mob-sakai/ParticleEffectForUGUI

2 Likes

Amazing reference - thank you so much :slight_smile:

if you all are making 2D game then first set the viewport as 3D and make a gameobject in which the trail renderer is attached and change the z axis position of that gameobject on top over the canvas