Would it waste resources to first open a scene with get_tree(). change_stcene_to_2file, and then load the same scene with ResourceLoader. load_threaded-request? Will it load twice?
get_tree().change_scene_to_file("res://levels/levels_all.tscn")
...
...
#("res://levels/levels_all.tscn")scene script code:
func _ready():
ResourceLoader.load_threaded_request("res://levels/levels_all.tscn")
func _process(delta: float):
if not path:
return
var progress = []
var status = ResourceLoader.load_threaded_get_status(path, progress)
if status == ResourceLoader.ThreadLoadStatus.THREAD_LOAD_IN_PROGRESS:
progress_value = progress[0] * 100
progress_bar.value = move_toward(progress_bar.value, progress_value, delta * 20)