How to check if node is initialized in get/set?

Godot Version

v4.3.stable.mono.official [77dcf97d8]

Question

I have some custom get/set methods on a custom component based on a Node2D. When the values of these parameters change, I want to update the values of some of the child nodes of my scene. The trouble is, sometimes the setter is called before the node has finished initializing and the children have not been added yet, so variable names that start with $ and % do not resolve to anything.

Is there any way to check if my node has been initialized before trying to call methods on children?

is_node_ready()

2 Likes

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