[Android] Loading scenes with resource_queue not working properly.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nyenye

This is happening on Android. In the Godot Editor, it works just fine.

I am using the background loading method shown in the documentation: https://godot.readthedocs.io/en/latest/tutorials/misc/background_loading.html#id1

Textures are not loaded on Android.

Video showing error:
https://streamable.com/kvyl4

Example project with reproducible issue
https://github.com/nyenye/godot-scene-transition

I never practiced background loading, but at a glance I notice a few things:
I assume you want to load thoses cities asynchronously?

preload loads a resource on the main thread when the script gets loaded, so you should not even think about using it for background loading (the demo is using it for a helper script only).

Similarly, const can be used only with constant expressions that can be evaluated when the script is loaded, and load is not one of them. So don’t use this either if you want to load its value in background.

The code you are showing doesn’t look like the example and I don’t see much useful info in the videos, so can’t really say more…

Zylann | 2018-02-27 14:01

Thanks, and sorry about the shortness in the question. I’m trying to put together a sample project.

About the const/load, my bad, when copy pasting I edited the preload, but left the const.

Then more generally, to load a scene, which in turn load other scenes async, should I use the resource_queue instead of the load/preload for those subscenes too?

Also I’ve tried the same (with the preload), and it works with smaller textures.

Nyenye | 2018-02-27 14:33

I’ve added a test project with the issue. Right now I’m not using preload nor load, but the resource_queue.gd script from the official docs. Hope it helps.

Nyenye | 2018-02-27 18:41

Did you get it to work yet? I encounter the same problem, sort of.

Footurist | 2018-02-28 23:15

Sorry for the delay. The answer is no. I can’t for the life of me get a way to make it work. I posted an issue on github, and they tagged it as a “OpenGL 3.0 and Adreno GPU not being compatible”, but not sure really.

Nyenye | 2018-04-09 08:13