Hi ! I have 3 scenes (titlescreen, waitingroom & ingame) and I've been trying to smoothly load the ingame.tscn when clicking a button on the titlescreen.
Happycamper helped me with some lines of code (thx!), but I'm still not understanding how to deal with threads....
this is what I have in the titlescreen scene script :
and in the global.gd singleton :
onready var thread = Thread.new()
onready var current_scene = get_node("/root/titlescreen")
current_scene = new_scene
var s = ResourceLoader.load("res://scenes/waitingroom.tscn")
var scene = s.instance()
thread.call_deferred('wait to finish')
All it does at the moment is clear the titlescreen, but there's no waitingroom nor ingame scene appearing. I don't know what to put instead of 'wait to finish' in the call_deferred, and don't see where the code is checking the progression of the loading of the ingame scene...
Can someone please make it a bit clearer for me ? :/