Why does set_layer() not work?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By John97

In the editor, when I set a canvas layer to 1, all of its child nodes behave accordingly. When I set the canvas layer to 0 in the editor and programmatically set it to 1, this does not happen, and I know it’s been set to 1 since I check with get_layer(). How do I fix this?

What do you mean by ‘behaving accordingly’? What were you expecting and what did you get? I tried and everything works fine when setting the CanvasLayer’s layer from code.

Lola | 2021-07-16 19:20