0 votes

I have a bunch of export variables with setget functions when the scene runs the debugger complains that the Node I want to change is a null instance. I have the nodepaths of my nodes stored in a const dictionary but even thought I can print the nodepath in the setget function and is correct, get_node(nodepath) is returning null.

So I figured that setget is triggering before the node is ready and I fixed it using yield(self,"ready") on every setget function but I don't like this solution is there any other way to achieve this?

Godot version 3.3.3
in Engine by (396 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.