#Assets in builds?

2 messages · Page 1 of 1 (latest)

bold mauve
#

So, I just tried running my game from the generated .exe, and noticed there were errors about missing assets.

I then saw this page saying the assets have to be distributed with the build: https://bevy-cheatbook.github.io/platforms/windows.html

I tried copying my assets in an assets folder next to my .exe and it worked, but I'm wondering: how should this be handled if I don't want players to have direct access to the game's assets? Does Bevy provide a way to encrypt them?

flat granite
#

you can implement your own AssetLoader which can associate itself with some file extensions, for example .bin. It uses futures_io which is not the most intuitive thing around so I recommend checking bevy's source code to see how to implement that trait. There's probably a few crates for encrypting assets, but I haven't looked into them yet.