bevy/docs
Carter Anderson 98938a8555 Internal Asset Hot Reloading (#3966)
Adds "hot reloading" of internal assets, which is normally not possible because they are loaded using `include_str` / direct Asset collection access.

This is accomplished via the following:
* Add a new `debug_asset_server` feature flag
* When that feature flag is enabled, create a second App with a second AssetServer that points to a configured location (by default the `crates` folder). Plugins that want to add hot reloading support for their assets can call the new `app.add_debug_asset::<T>()` and `app.init_debug_asset_loader::<T>()` functions.
* Load "internal" assets using the new `load_internal_asset` macro. By default this is identical to the current "include_str + register in asset collection" approach. But if the `debug_asset_server` feature flag is enabled, it will also load the asset dynamically in the debug asset server using the file path. It will then set up a correlation between the "debug asset" and the "actual asset" by listening for asset change events.

This is an alternative to #3673. The goal was to keep the boilerplate and features flags to a minimum for bevy plugin authors, and allow them to home their shaders near relevant code. 

This is a draft because I haven't done _any_ quality control on this yet. I'll probably rename things and remove a bunch of unwraps. I just got it working and wanted to use it to start a conversation.

Fixes #3660
2022-02-18 22:56:57 +00:00
..
cargo_features.md Internal Asset Hot Reloading (#3966) 2022-02-18 22:56:57 +00:00
debugging.md Useful changes with relicensing benefits (#2497) 2021-07-17 21:59:31 +00:00
LICENSE-APACHE Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
LICENSE-MIT Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
linters.md GitHub Action: Check local Markdown links on push (#2067) 2021-05-02 20:22:32 +00:00
linux_dependencies.md Add missing dependencies for Fedora with Wayland (#3708) 2022-01-17 22:22:16 +00:00
plugins_guidelines.md Update plugin guidelines (#2692) 2021-08-19 20:22:38 +00:00
profiling.md Fix call with features in docs/profiling.md (#3967) 2022-02-17 18:51:43 +00:00
release_checklist.md Release Checklist (#1834) 2021-04-08 21:33:46 +00:00