Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Tiez |
image hosted at ImgBB — ImgBB Here is a link to the SS
I have been trying to access a console node from tree. Clearly node path is correct but godot doesnt get it.
Here is my code:
onready var console = get_parent().get_node(“Player/CanvasLayer/console”)
func _physics_process(delta):
print(is_instance_valid(console)) <---- dis line keeps outputing false
I think the problem is console isnt in the tree when game launches. its instanced when player presses the console_toggle button. But as you can see when console node is instanced to the scene tree, line i mentioned above still returns false, and when i get rid of /console after canvaslayer it returns true.