bevy/crates/bevy_scene/src/lib.rs
Alejandro Pascual 53d387f340 Show prelude re-exports in docs (#6448)
# Objective

- Right now re-exports are completely hidden in prelude docs.
- Fixes #6433

## Solution

- We could show the re-exports without inlining their documentation.
2022-11-02 19:35:06 +00:00

41 lines
1.0 KiB
Rust

mod bundle;
mod dynamic_scene;
mod dynamic_scene_builder;
mod scene;
mod scene_loader;
mod scene_spawner;
pub mod serde;
pub use bundle::*;
pub use dynamic_scene::*;
pub use dynamic_scene_builder::*;
pub use scene::*;
pub use scene_loader::*;
pub use scene_spawner::*;
pub mod prelude {
#[doc(no_inline)]
pub use crate::{
DynamicScene, DynamicSceneBuilder, DynamicSceneBundle, Scene, SceneBundle, SceneSpawner,
};
}
use bevy_app::prelude::*;
use bevy_asset::AddAsset;
use bevy_ecs::prelude::*;
#[derive(Default)]
pub struct ScenePlugin;
impl Plugin for ScenePlugin {
fn build(&self, app: &mut App) {
app.add_asset::<DynamicScene>()
.add_asset::<Scene>()
.init_asset_loader::<SceneLoader>()
.init_resource::<SceneSpawner>()
.add_system_to_stage(CoreStage::PreUpdate, scene_spawner_system.at_end())
// Systems `*_bundle_spawner` must run before `scene_spawner_system`
.add_system_to_stage(CoreStage::PreUpdate, scene_spawner);
}
}