Misleading warning in Control nodes

Godot Version

4.2.1 Stable


Should a warning be displayed to Control nodes whose Z-Index has been changed?

I changed Z-Index in my TextureRect node that is a child of an HBoxContainer.
And then the warning appeared:

Godot shows a warning about node configuration. Warns that Z-index only affects the rendering order, not the order in which input events are handled.

This warning, it seems to me, can only be confusing. After all, if it warns about this only in Control nodes, does this mean that in other nodes changing the Z index affects the input?

I’m guessing it has no effect, but this hint confused me. And I think it also represents harmful knowledge for beginners. After all, if a message notes the importance of something in one place, for example, they say that in this case Z index does not affect the input, does that mean it affects in other places?

Moreover, warnings usually contain things that pose a danger. Most often this is a warning about an uninitialized node and/or something that needs to be fixed.

I don’t need to fix anything here. Due to the fractional values, the edge of the texture with the candle wick blinked in front of the wax. For this reason, I hid the candle wick behind the wax by changing Z index.

The warning message itself sounds like Captain Obvious to me, I don’t need it. I still believe that changing the Z index does not affect the input in absolutely all nodes.

If this is not the case, then please let me know.

I would also like to know if there is functionality to suppress such warnings in individual cases? Similar to @warning-ignore.

If such a warning is still required, is there a functionality to suppress this, like @warning-ignore does?

I would like to discuss about necessity of this warning and know about further steps, what could I do with it.

The warning is correct. As far as I know, it’s not possible to be disabled.

Only Control nodes are affected as they have a concrete way to handle input events and changing their z-index property only affects their drawing order. Their input event handling order is not affected by modifying their z-index property.

Because Node2D nodes don’t have a concrete way of handling the input events, changing the z-index property of a Node2D node does not need a warning.


Thanks, completely forgot about that handling with draw order. Okay, then it’s just a remainder for this.

See discussion on GitHub: Changing Control node Z Index pushes unnecessary Node configuration warning · Issue #69895 · godotengine/godot · GitHub

1 Like

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