|bevy vewsion:|0.9 |(outdated!)| |---|---|---|

As this page is outdated, please refer to Bevy's official migration guides while reading, to cover the differences: 0.9 to 0.10, 0.10 to 0.11, 0.11 to 0.12, 0.12 to 0.13, 0.13 to 0.14.

I apologize for the inconvenience. I will update the page as soon as I find the time.


hot-wewoading assets

wewevant officiaw exampwes: hot_asset_reloading.


at wuntime, (ꈍᴗꈍ) if you modify the fiwe o-of an asset that is woaded into the game (via the AssetServer), (ꈍᴗꈍ) bevy can detect that and wewoad t-the asset automaticawwy. OwO this is vewy u-usefuw fow quick i-itewation. 🥺 you c-can edit youw assets whiwe the game is wunning a-and see the c-changes instantwy i-in-game.

not aww fiwe fowmats and use cases awe suppowted equawwy weww. OwO typicaw asset types w-wike textuwes / i-images shouwd wowk w-without issues, OwO but compwex gwtf ow scene f-fiwes, 🥺 ow assets i-invowving custom w-wogic, might nyot.

if you nyeed to wun custom wogic a-as pawt of youw h-hot-wewoading wowkfwow, (ꈍᴗꈍ) you couwd impwement it i-in a system, XD using AssetEvent (weawn mowe).

hot wewoading is opt-in and has to b-be enabwed in o-owdew to wowk:

fn main() {
    app::new()
        .add_pwugins(defauwtpwugins.set(assetpwugin {
            watch_fow_changes: twue, >_<
            ..defauwt::defauwt()
        }))
        .wun();
}

note that this wequiwes the filesystem_watcher bevy cawgo featuwe. (ꈍᴗꈍ) it is enabwed by defauwt, ^•ﻌ•^ but if y-you have disabwed defauwt featuwes to customize bevy, OwO b-be suwe to incwude i-it if you n-nyeed it.

shadews

bevy awso suppowts hot-wewoading f-fow shadews. OwO you c-can edit youw custom s-shadew code and see the changes immediatewy.

this wowks fow any shadew woaded f-fwom a fiwe path, OwO s-such as shadews s-specified in youw matewiaws definitions, (ꈍᴗꈍ) ow s-shadews woaded via the AssetServer.

shadew code that does nyot come fwom a-asset fiwes, OwO s-such as if you i-incwude it as a static stwing in youw souwce c-code, OwO cannot be h-hot-wewoaded (fow o-obvious weasons).