-
I'd like to load a json asset file into string for parsing by the serde library. It looks like text files aren't currently supported for loading via the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The way to do it is a custom asset loader. There are some published package that you can use for inspiration here https://bevyengine.org/assets/#helpers. There's also an example in the bevy repo. If you're just trying to hack something together and don't care about blocking rendering for a bit, you can also just do blocking file operations from inside of a system. |
Beta Was this translation helpful? Give feedback.
-
There are plugins available for this now. The place to look is https://bevyengine.org/assets/#asset-loading, and specifically https://github.com/NiklasEi/bevy_common_assets handles json for you (as well as several other formats). |
Beta Was this translation helpful? Give feedback.
The way to do it is a custom asset loader. There are some published package that you can use for inspiration here https://bevyengine.org/assets/#helpers. There's also an example in the bevy repo.
If you're just trying to hack something together and don't care about blocking rendering for a bit, you can also just do blocking file operations from inside of a system.