Demonstrate how to dispatch assets of the same extension to different Rust types #10595
Labels
A-Assets
Load files from disk to use for things like images, models, and sounds
C-Examples
An addition or correction to our examples
@alice-i-cecile Yes that should be entirely possible:
AssetLoader
to give you the parsed contents to inspect.I imagine you'd want an
enum
for the central collection, and that would probably be the type ofmy_data_handle
in the abovematch
statement instead of usingUntypedHandle
's. Additionally, this behaviour is extended to theLoadContext::load
method, so you could put all of this functionality into a customAssetLoader
if theload_with_reader
method @nicopap suggested in #10565 was added (would need another PR to add).Originally posted by @bushrat011899 in #10153 (comment)
The text was updated successfully, but these errors were encountered: