An experimental hot reload system for the bevy game engine. Inspired by DGriffin91's Ridiculous bevy hot reloading - adding the ability to re-load arbitrary systems, and the ability to transform resource/component structures over time.
Fuller documentation is available at: https://lee-orr.github.io/dexterous_developer/
Grab the CLI by running: cargo install dexterous_developer_cli
.
You'll be able to run the dexterous verion of your code by running dexterous_developer_cli
in your terminal.
In your Cargo.toml
add the following:
```toml [lib] name = "libTHENAMEOFYOUR_GAME" path = "src/lib.rs" crate-type = ["rlib", "dylib"]
[dependencies] bevy = "0.11" dexterous_developer = "0.0.8" serde = "1" # If you want the serialization capacities ```
If your game is not a library yet, move all your main logic to lib.rs
rather than main.rs
. Then, in your main.rs
- call the bevy_main function:
```rust fn main() { libNAMEOFYOURGAME::bevy_main(); }
```
and in your lib.rs
, your main function should become:
```rust
pub fn bevymain(initialplugins: impl InitialPlugins) {
App::new()
.addplugins(initialplugins.initialize::
If you have a plugin where you want to add reloadable elements, add the following in the file defining the plugin:
```rust
impl Plugin for MyPlugin {
fn build(&self, app: &mut App) {
app
.setupreloadableelements::
fn reloadable(app: &mut ReloadableAppContents) { app .addsystems(Update, thissystemwillreload); }
```