mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 13:32:32 +00:00
528e13a250
* feat(bevy_gltf_components): * create crate * added SystemSet (GltfComponentsSet) to run process_loaded_scenes (where components are injected) in a specific systemset & allow ordering other systems relative to it * feat(bevy_gltf_blueprints): * created crate * made the blueprint library path configurable * added BluePrintBundle helper * added SystemSet (GltfBlueprintsSet) for better system ordering * integrated into advanced demo * feat(tools-blender-auto-export): * renamed blender tool to gltf_auto_export * rewritten auto_export * added blueprint / prefab support * creates scene with empties with BlueprintName components in the scene * export of the main scene now exports this scene instead of real main scene * changes collection stand in names in original scene & sets them back after export to have correctly named collection instance exports * also added an additional 'SpawnHere' component to not conflate BlueprintNames & spawning requests * toggling & blueprint library output parameters added * added correct handling/ restoring of saved selection when using blueprints * feat(examples): * added advanced example * general example renamed to "basic", and cleaned up * feat(various): a lot of experiments with saving & loading etc * chore(assets): updated blend & generated assets * fix(examples-advanced): disabling hot reloading as it messes up scenes in experiments with save & loading * docs(): * added & fleshing out docs for the various crates & main README * added process doc image & tweaks to README * added missing licence info where relevant * fixed broken links * clarified some aspects * added updated screenshots where relevant * added tweaks & improvements etc
34 lines
1.1 KiB
Rust
34 lines
1.1 KiB
Rust
pub mod assets_core;
|
|
pub use assets_core::*;
|
|
|
|
pub mod assets_game;
|
|
pub use assets_game::*;
|
|
|
|
use bevy::prelude::*;
|
|
use bevy_asset_loader::prelude::*;
|
|
|
|
use crate::state::{AppState};
|
|
|
|
pub struct AssetsPlugin;
|
|
impl Plugin for AssetsPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app
|
|
// load core assets (ie assets needed in the main menu, and everywhere else before loading more assets in game)
|
|
.add_loading_state(LoadingState::new(AppState::CoreLoading).continue_to_state(AppState::MenuRunning))
|
|
.add_dynamic_collection_to_loading_state::<_, StandardDynamicAssetCollection>(
|
|
AppState::CoreLoading,
|
|
"advanced/assets_core.assets.ron",
|
|
)
|
|
.add_collection_to_loading_state::<_, CoreAssets>(AppState::CoreLoading)
|
|
|
|
// load game assets
|
|
.add_loading_state(LoadingState::new(AppState::AppLoading).continue_to_state(AppState::AppRunning))
|
|
.add_dynamic_collection_to_loading_state::<_, StandardDynamicAssetCollection>(
|
|
AppState::AppLoading,
|
|
"advanced/assets_game.assets.ron",
|
|
)
|
|
.add_collection_to_loading_state::<_, GameAssets>(AppState::AppLoading)
|
|
|
|
;
|
|
}
|
|
} |