Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dsina |
I am unable to load(and thus instantiate) scene files that I have gotten through the web and written at runtime.
The errors that I get are:
**ERROR**: No loader found for resource: res://house.glb
**ERROR**: At: core/io/resource_loader.cpp:186:_load() Method/Function Failed, returning: RES()
It does work with .tscn files but not with .glb and .dae files. I am using the html5 export if that makes a difference. Am I doing something wrong or is this a missing feature? How to draw a rawarray Image · Issue #4024 · godotengine/godot · GitHub seems to show that similar things are possible for .png atleast.
Here’s the relevant code:
var building_path="res://house.glb"
var input = _fetch_js_input() #Contains the .glb file as PoolByteArray, I get this through javascript in the webbuild
var file=File.new()
file.open(building_path,File.WRITE)
# Save byte by byte
for item in input["data"]:
file.store_8(item)
file.close()
var building_scene = load(building_path)
I asked this on GitHub as well, btw. Here’s the issue about it.
Not sure if this feature will come in the future but currently it’s not planned.
dsina | 2018-06-11 11:25
dsina: I need to ask you a question about this answer you give me here I need to know how to make it work…thanks.
ferhand | 2018-06-11 22:49