Control render order between Image and Sprite Renderer

Hi Unity,

I can’t for the life of me figure out how to control the render order of multiple Images and Sprite Renderers. I have the following render order setup I would like to achieve:

  1. Image (Background)
  2. Sprite Render
  3. Image
  4. Sprite Render (Foreground)

I tried creating multiple canvases and override the sorting order, I tried placing both Images and Sprite Renders on different layers. I have succesfully managed to achieve the first three orders by using different canvases:

  1. Image (Background)
  2. Sprite Render
  3. Image (Foreground)

But the second I attempt to add the second Sprite Render, I get the following:

  1. Image (Background)
  2. Sprite Render
  3. Sprite Render
  4. Image (Foreground)

The second Sprite Render always appears to be rendered after the first canvas but always before the second canvas.

The reason I am mixing these two is because I am making an application where some gameobjects is to be affected by both physics and navmesh and therefore thought it would be ideal to visually represent them using Sprite Renders.

Anyone here with an idea or know a bit in depth on how the render order works?

Ever found a way around this?

I am sorry. This was long ago and I can’t remember much of the issue in question.