system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Krasapan |
I need to change the value of the variable radial_menu
which is in Stage1/PlayerScene
from Stage1/HUD/playerHudScene
. How to do that?
SceneTree:
┖╴Stage1
┠╴PlayerScene
┖╴HUD
┖╴playerHudScene
system
2
|
|
|
|
Reply From: |
Wakatta |
It’s frequently debated which is the correct approach but I’ll let you choose whichever you find most appropriate.
get_parent().get_parent().get_node("PlayerScene")
.radial_menu
find_parent("Stage1").get_node("PlayerScene")
.radial_menu
get_node("/root/Stage1/PlayerScene"
.radial_menu
get_tree().get_current_scene().get_child(1)
.radial_menu