c# – Unity How to change the Rendering Order of A canvas

c# – Unity How to change the Rendering Order of A canvas

After doing some research I found the proper way to change the Canvas Rendering Order. There is a property in the Canvas for the Sort Order, which is really the render order.

enter.

Just as a note remember the controls you want to be on top should have a larger order than the control on bottom.

Order in the editor window should work here. Are you sure youre changing the order of elements inside one canvas element?

Note that the order of elements in the Canvas game object is the order everything is rendered in – so the last thing you have in canvas will be the last thing drawn, so it will be on top of everything.

Heres how it works:
editor

This is demonstrated with Unity 5.3.4, with much older Unity it can be different (there was a change of the way how children were enumerated somewhere in 5.0 or 5.1 AFAIK).

c# – Unity How to change the Rendering Order of A canvas

Leave a Reply

Your email address will not be published.