Skip to content

Commit

Permalink
update bevy to main
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Jun 18, 2023
1 parent 109fc60 commit 13447c2
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn main() {
.add_plugins(DefaultPlugins)
.add_plugin(EguiPlugin)
.add_plugin(bevy_inspector_egui::DefaultInspectorConfigPlugin) // adds default options and `InspectorEguiImpl`s
.add_system(inspector_ui)
.add_systems(Update, inspector_ui)
.run();
}

Expand Down
6 changes: 3 additions & 3 deletions crates/bevy-inspector-egui-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ quote = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
bevy_ecs = { version = "0.10", default-features = false }
bevy_math = { version = "0.10", default-features = false }
bevy_reflect = { version = "0.10", default-features = false }
bevy_ecs = { git = "https://github.com/bevyengine/bevy.git", branch = "main", default-features = false }
bevy_math = { git = "https://github.com/bevyengine/bevy.git", branch = "main", default-features = false }
bevy_reflect = { git = "https://github.com/bevyengine/bevy.git", branch = "main", default-features = false }
bevy-inspector-egui = { path = "../bevy-inspector-egui" }
47 changes: 30 additions & 17 deletions crates/bevy-inspector-egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,52 @@ license = "MIT OR Apache-2.0"
description = "Inspector plugin for the bevy game engine"
documentation = "https://docs.rs/bevy-inspector-egui"
keywords = ["bevy", "inspector", "egui", "editor", "reflect"]
categories = ["game-development", "gui", "visualization", "development-tools::procedural-macro-helpers"]
categories = [
"game-development",
"gui",
"visualization",
"development-tools::procedural-macro-helpers",
]

[features]
default = ["bevy_pbr"]
highlight_changes = []

[dependencies]
bevy-inspector-egui-derive = { version = "0.18.0", path = "../bevy-inspector-egui-derive" }
bevy_app = { version = "0.10" }
bevy_asset = { version = "0.10" }
bevy_core = { version = "0.10" }
bevy_ecs = { version = "0.10" }
bevy_hierarchy = { version = "0.10" }
bevy_log = { version = "0.10" }
bevy_math = { version = "0.10" }
bevy_reflect = { version = "0.10" }
bevy_utils = { version = "0.10" }
bevy_window = { version = "0.10" }

bevy_core_pipeline = { version = "0.10" }
bevy_pbr = { version = "0.10", optional = true }
bevy_render = { version = "0.10" }
bevy_app = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_asset = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_core = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_ecs = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_hierarchy = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_log = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_math = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_reflect = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_utils = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_window = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }

bevy_core_pipeline = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }
bevy_pbr = { git = "https://github.com/bevyengine/bevy.git", branch = "main", optional = true }
bevy_render = { git = "https://github.com/bevyengine/bevy.git", branch = "main" }

egui = "0.21"
bevy_egui = "0.20"
bevy_egui = { git = "https://github.com/Vrixyz/bevy_egui.git", branch = "bevy-main" }

image = { version = "0.24", default-features = false }
once_cell = "1.16"
pretty-type-name = "1.0"
smallvec = "1.10"

[dev-dependencies]
bevy = { version = "0.10", default-features = false, features = ["x11", "bevy_winit", "bevy_pbr", "bevy_sprite", "bevy_core_pipeline", "animation", "png"] }
bevy = { git = "https://github.com/bevyengine/bevy.git", branch = "main", default-features = false, features = [
"x11",
"bevy_winit",
"bevy_pbr",
"bevy_sprite",
"bevy_core_pipeline",
"animation",
"png",
] }
egui_dock = "0.4"
egui-gizmo = "0.10"
# bevy_mod_picking = { git = "https://github.com/aevyrie/bevy_mod_picking", rev = "554649a951689dce66d0d759839b326874e8826f", default-features = false, features = ["backend_raycast", "backend_egui", "backend_sprite"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ fn main() {
.register_type::<Config>()
.register_type::<Shape>()
.register_type::<UiData>()
.add_startup_system(setup)
.add_system(ui_example)
.add_systems(Statup, setup)
.add_systems(Update, ui_example)
.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ fn main() {
// insert and register resource
.init_resource::<Configuration>()
.register_type::<Configuration>()
.add_startup_system(setup)
.add_systems(Startup, setup)
// add the system showing the UI
.add_system(inspector_ui)
.add_systems(Update, inspector_ui)
.run();
}

Expand Down
18 changes: 7 additions & 11 deletions crates/bevy-inspector-egui/examples/integrations/egui_dock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,17 @@ fn main() {
.add_plugin(bevy_egui::EguiPlugin)
// .add_plugins(bevy_mod_picking::plugins::DefaultPickingPlugins)
.insert_resource(UiState::new())
.add_startup_system(setup)
.add_system(
.add_systems(Startup, setup)
.add_systems(
PostUpdate,
show_ui_system
.in_base_set(CoreSet::PostUpdate)
.before(EguiSet::ProcessOutput)
.before(bevy::transform::TransformSystem::TransformPropagate),
)
.add_system(
set_camera_viewport
.in_base_set(CoreSet::PostUpdate)
.after(show_ui_system),
)
.add_system(set_gizmo_mode)
// .add_system(auto_add_raycast_target)
// .add_system(handle_pick_events)
.add_systems(PostUpdate, set_camera_viewport.after(show_ui_system))
.add_systems(Update, set_gizmo_mode)
// .add_systems(Update, auto_add_raycast_target)
// .add_systems(Update, handle_pick_events)
.register_type::<Option<Handle<Image>>>()
.register_type::<AlphaMode>()
.run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ fn main() {
.add_plugins(DefaultPlugins)
.add_plugin(EguiPlugin)
.add_plugin(DefaultInspectorConfigPlugin)
.add_startup_system(setup)
.add_system(rotator_system)
.add_system(inspector_ui.run_if(input_toggle_active(true, KeyCode::Escape)))
.add_systems(Startup, setup)
.add_systems(Update, rotator_system)
.add_systems(
Update,
inspector_ui.run_if(input_toggle_active(true, KeyCode::Escape)),
)
.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(AssetInspectorPlugin::<StandardMaterial>::default())
.add_startup_system(setup)
.add_systems(Startup, setup)
.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(FilterQueryInspectorPlugin::<With<Transform>>::default())
.add_startup_system(setup)
.add_systems(Startup, setup)
.run();
}

Expand All @@ -29,15 +29,15 @@ fn setup(
..default()
});
// light
commands.spawn(PointLightBundle {
/*commands.spawn(PointLightBundle {
point_light: PointLight {
intensity: 1500.0,
shadows_enabled: true,
..default()
},
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..default()
});
});*/
// camera
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() {
)
.init_resource::<Configuration>()
.register_type::<Configuration>()
.add_startup_system(setup)
.add_systems(Startup, setup)
.run();
}

Expand Down
8 changes: 4 additions & 4 deletions crates/bevy-inspector-egui/examples/quick/state_inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ fn main() {
.add_state::<AppState>()
.register_type::<AppState>()
.add_plugin(StateInspectorPlugin::<AppState>::default())
.add_startup_system(setup)
.add_system(set_color::<158, 228, 147>.in_schedule(OnEnter(AppState::A)))
.add_system(set_color::<172, 200, 192>.in_schedule(OnEnter(AppState::B)))
.add_system(set_color::<194, 148, 138>.in_schedule(OnEnter(AppState::C)))
.add_systems(Startup, setup)
.add_systems(OnEnter(AppState::A), set_color::<158, 228, 147>)
.add_systems(OnEnter(AppState::B), set_color::<172, 200, 192>)
.add_systems(OnEnter(AppState::C), set_color::<194, 148, 138>)
.run();
}

Expand Down
6 changes: 3 additions & 3 deletions crates/bevy-inspector-egui/examples/quick/world_inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
.add_plugin(
WorldInspectorPlugin::default().run_if(input_toggle_active(true, KeyCode::Escape)),
)
.add_startup_system(setup)
.add_systems(Startup, setup)
.run();
}

Expand All @@ -32,15 +32,15 @@ fn setup(
..default()
});
// light
commands.spawn(PointLightBundle {
/*commands.spawn(PointLightBundle {
point_light: PointLight {
intensity: 1500.0,
shadows_enabled: true,
..default()
},
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..default()
});
});*/
// camera
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_systems(Startup, setup)
.run();
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy-inspector-egui/src/bevy_inspector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn ui_for_state<T: States + Reflect>(world: &mut World, ui: &mut egui::Ui) {
};
let mut env = InspectorUi::for_bevy(&type_registry, &mut cx);

let mut current = state.0.clone();
let mut current = state.clone();
let changed = env.ui_for_reflect(&mut current, ui);

if changed {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy-inspector-egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
//! .add_plugins(DefaultPlugins)
//! .add_plugin(EguiPlugin)
//! .add_plugin(bevy_inspector_egui::DefaultInspectorConfigPlugin) // adds default options and `InspectorEguiImpl`s
//! .add_system(inspector_ui)
//! .add_systems(Update, inspector_ui)
//! .run();
//! }
//!
Expand Down
Loading

0 comments on commit 13447c2

Please sign in to comment.