You've just called queue_free() on a node in your scene in Godot. However, right after that line, you need to execute a function, _update_ui_elements(), which might have previously referenced parts of the now-deleted node. To prevent your game from crashing with an "invalid instance" error, how do you safely tell Godot to run _update_ui_elements() only after the node is truly gone and dusted?
Game Dev for Noobs
You've just called queue_free() on a node in your scene in Godot. However, right after that line, you need to execute a function, _update_ui_elements(), which might have previously referenced parts of the now-deleted node. To prevent your game from crashing with an "invalid instance" error, how do you safely tell Godot to run _update_ui_elements() only after the node is truly gone and dusted?
3 months ago | [YT] | 19