With the alpha set to 255. My scene tree has a base CanvasLayer1 → Control → ColorRect, and the empty tile placeholders are rendered on a tilemap under CanvasLayer1 → CanvasLayer2 → Node2D → TileMapLayer. The Control and ColorRect both have a Z axis of 2, the Node2D and TileMapLayer have a Z axis of 0.
Given that setup, with the ColorRect and the TilemapLayer on the same canvas layer, I figured the ColorRect would render on top of the TileMapLayer, but that doesn’t appear to be the case.
Actgame being a child of a CanvasLayer is most likely the reason it’s rendering above the ColorRect. Try decreasing the Layer property of the GameCanvas and see if that fixes the issue.
Some additional info: the z-indices of nodes stop mattering when they are children of different CanvasLayers. This is really useful when you have nodes that you need to render on top of everything else: just put them on a CanvasLayer!
So first things first, CanvasLayers have their own Z levels and you didn’t mention their setting yet. So that might mess up your other Z levels, if you are not careful. @neropatti was already mentioning that.
Secondly, I would put both CanvasLayers on the same parent and not nest them within each other. Unless you have a very good reason to do so. I cannot imagine any off the top of my head, but it might be that there is some reasons. Better avoid complications, if there is no reason for it.
Thank you both! It was that, CanvasLayer overriding the Z-index.
I’m curious, what is the benefit of not having a parent CanvasLayer? I found that my rendering of various scenes wouldn’t resize correctly unless they were parented by the single canvas.