Hello,
i am trying to create a loading screen using the interactive resource loader. I am mainly using the code provided by this example : godot-docs
Everything works for me except the updating progress bar. When i start the function my loading screen pops up but the progess bar doesnt move.
I have tried printing the progress each time the loader polls and i found out it only calls the updateProgress() function after it finished loading everything.
this is the process function:
if loader == null:
set_process(false)
return
if wait_frames > 0:
wait_frames -= 1
return
var t = OS.get_ticks_msec()
while OS.get_ticks_msec() < t + time_max:
var err = loader.poll()
if err == ERR_FILE_EOF:
var resource = loader.get_resource()
loader = null
remove_child(loadingScreen_instance)
loadingScreen_instance.queue_free()
game_instance = resource.instance()
add_child(game_instance)
break
elif err == OK:
updateProgress() -> **this function only triggers after everything is loaded**
else:
print("error during loading")
loader = null
break
does anybody know a solution?
thanks and best regards
tobi