|
|
|
 |
Reply From: |
exuin |
Yield for the ready signal from Calibration1.
yield(get_node("/root/Calibration1"), "ready")
after trying, i find that if i set my main scene as calibration1.tscn, it can run because then the tree of calibration1.tscn will appear in the root (remote).
but when i try to run the other scenes such as main menu, the root changes back to the tree of that particular scene and the the gridcontainer node cannot be found again because then it does not appear in the root (remote)
what way can i solve this? how do i have the tree of this scene always active in the root other than setting it as the main scene? or am i missing something?
You must make it an autoload singleton if you always want it to be in the SceneTree.
yeah, the singleton is there on the scenetree.
but currently the scenetree only have my main menu scene and the singleton active there. my calibration1 tree is not active, therefore the gridcontainer under the calibration1 control node cant be found and therefore throwing me the error.
I’m not referring to the Singleton you already have. If you want to have Calibration1 still in the SceneTree even when the main scene is the main menu, you will need to make Calibration1 a Singleton.
oohh, u mean the scene itself as a singleton.
I’m facing another problem whereby if I make calibration1.tscn a singleton, the program can run but the things that suppose to load inside calibration1 is gone.
Right now the things inside calibration1.tscn can only run if I play it from calibration1.tscn but it cant be set a singleton otherwise the things inside wont load apparently.
So basically if I make calibration1.tscn a singleton as you mentioned, the project can run from the main menu but then when it arrives at calibration1.tscn the things inside wont load. If I don’t make calibration1.tscn a singleton, the things inside can load only when played directly from the scene itself since playing the whole project from the main menu would throw the node not find error again.