Are layers and z-indexes shared globally or only locally?

Question

If I have a node structure as follows:
image
And both are on layer 1. Will the child canvas layer render alongside the parent canvas layer as they are on layer 1? or the parent will have its own layers and the child will be rendered according to the parent layers and don’t share the global one.

So are there like global layers that the canvas layers share irrespective of whether they are in parent-child structure or not?

Or the following is correct?

and the same question for the z-index as well. If a node has multiple children having some z-indexes, will those z-indexes will only work locally for that parent or are shared globally with all other nodes in the project?

If someone understands what I’m saying, I’ll appreciate the help.

I set up a simple scene with 4 sprites, with a hierarchy as below:

Root
|
+ - Icon [z_index: 0] (red)
|   |
|   + - Icon2 [z_index: 2] (purple)
|
+ - Icon3 [z_index: 1] (green)
|
+ - Icon4 [z_index: 3] (yellow)

The result is that the z-index is calculated globally, rather than a sub-z-index layer for each node.

1 Like

Thank you so much. I was able to get the same thing with canvas layers as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.