I have a Label that prints ‘YOU DIED’ when a bullet hits you and i have a color rect that is showing in front of the label,but how do i make to label shows infront of the color rect.I tried Z index but it dosent work.Both of label and color rect are childs of canvas layer and hboxcontanier
You should probably not change the z index. The child node always shows before its parent, the node below always shows before the upper one. So you can rearrange them, like put the color rect ahead the label, and set label visibility to true when a bullet hit the player. All above is my opinion, has not been tested yet.