#load asset from byte stream

3 messages · Page 1 of 1 (latest)

tame fiber
#

So the .load(…) call here returns before the asset is properly loaded. load tells bevy to reserve a place where to load the asset and start loading it. It returns immediately with a handle to the future location of the asset.

#

Furthermore, the argument to load is not necessarily a file. It's just a "path" to pass to the AssetReader you told bevy to use

#

You can define a custom AssetReader. You could then implement that AssetReader in such a way that it gets its data from javascript.