Files
storyteller-bevy/studio/src/inspector/mod.rs
T
Danny McGee cc00f197dc Refactor entry-point functions (#26)
This PR refactors the `studio` project's entry-point functions for
better maintainability and ease of use for local development.

### Overview
* `start_internal` refactored to return a `bevy::app::App` instead of
  calling `App::run`, allowing for finer-grained configuration of unique
  use cases
* Temporary `start` function added for WASM
* `init` function removed
* `main` standalone entry-point refactored to call `start_internal`

### Fixes
* Crash on non-WASM builds due to missing `StudioMode` resource
* Warning on non-WASM builds due to an unused variable
2024-01-18 15:52:33 -05:00

21 lines
430 B
Rust

use bevy::prelude::*;
#[cfg(feature = "wasm")]
mod wasm;
pub struct InspectorPlugin;
impl Plugin for InspectorPlugin {
fn build(
&self,
#[cfg(feature = "wasm")] app: &mut App,
#[cfg(not(feature = "wasm"))] _: &mut App,
) {
#[cfg(feature = "wasm")]
app.add_systems(
PostUpdate,
wasm::notify_entity_spawn_changes.map(bevy::utils::error),
);
}
}