2
\$\begingroup\$

I am using Unity 2019 with the Universal Render Pipeline. I have a canvas that is using Screen Space - Overlay render mode. I cannot change my render mode to Screen Space - Camera, because it is not currently supported by the Universal Render Pipeline.

How can I have a particle system, or any other 3D objects, render on top of my canvas?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

To render 3D objects on top of your canvas:

  1. Create a new Canvas in Screen Space - Overlay.
  2. Add a RawImage to that canvas.
  3. Create a new Render Texture.
  4. Add the Render Texture to the Raw Image.
  5. Create a new Camera.
  6. Set the camera to Solid Color background with an alpha of 0.
  7. Set the output texture of the camera to be the Render Texture you created.

You can now render 3D objects on top of your canvas; however, there are extra steps for particle systems:

  1. Create a material. Set its shader to Universal Render Pipeline/2D/Sprite-Lit-Default.
  2. Add your particle sprite to the Diffuse of your material.
  3. In the Renderer settings of your particle system, replace the material with the one you just created.

You should be good to go!

(If you have any problems, try going to your Render Settings and change the Anti Aliasing to 8x.)

WARNING: This will eat your battery. Be sure to disable the camera when not in use.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .