I did an interactive download of resources.
If I start debugging (Editor) on android it does not work.
Error 18, if I use "Wait"
I get null if I use "Poll"
Good code, is work!
extends Node
class_name AS_ResourceManager
static func load(path : String) -> Resource :
var res = ResourceLoader.load(path)
if res == null :
CoreSceneManager.show_error_scene("Resource " + path + " resource is null!");
return res;
Bad code, is dont work!
static func load(path : String) -> Resource :
var interact = ResourceLoader.load_interactive(path)
var err = interact.wait() #or poll()
if err != OK : #if poll err != 18 and err != OK
CoreSceneManager.show_error_scene("Resource " + path + " resource err: " + String(err)) #if wait, this error!
return null
var res = interact.get_resource()
if res == null :
CoreSceneManager.show_error_scene("Resource " + path + " resource is null!"); #if poll, this err!
return null
return res;