bevy/crates/bevy_ui/src/render
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
..
camera.rs Partially document bevy_ui (#3526) 2022-01-07 22:20:34 +00:00
mod.rs Internal Asset Hot Reloading (#3966) 2022-02-18 22:56:57 +00:00
pipeline.rs Prepare crevice for vendored release (#3394) 2021-12-23 22:49:12 +00:00
render_pass.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
ui.wgsl Update wgpu to 0.12 and naga to 0.8 (#3375) 2021-12-19 03:03:06 +00:00