bevy/crates/bevy_dev_tools/Cargo.toml

51 lines
1.9 KiB
TOML
Raw Normal View History

[package]
name = "bevy_dev_tools"
version = "0.15.0-dev"
edition = "2021"
description = "Collection of developer tools for the Bevy Engine"
homepage = "https://bevyengine.org"
repository = "https://github.com/bevyengine/bevy"
license = "MIT OR Apache-2.0"
keywords = ["bevy"]
[features]
Add a gizmo-based overlay to show UI node outlines (Adopted) (#11237) # Objective - This is an adopted version of #10420 - The objective is to help debugging the Ui layout tree with helpful outlines, that can be easily enabled/disabled ## Solution - Like #10420, the solution is using the bevy_gizmos in outlining the nodes --- ## Changelog ### Added - Added debug_overlay mod to `bevy_dev_tools` - Added bevy_ui_debug feature to `bevy_dev_tools` ## How to use - The user must use `bevy_dev_tools` feature in TOML - The user must use the plugin UiDebugPlugin, that can be found on `bevy::dev_tools::debug_overlay` - Finally, to enable the function, the user must set `UiDebugOptions::enabled` to true Someone can easily toggle the function with something like: ```rust fn toggle_overlay(input: Res<ButtonInput<KeyCode>>, options: ResMut<UiDebugOptions>) { if input.just_pressed(KeyCode::Space) { // The toggle method will enable if disabled and disable if enabled options.toggle(); } } ``` Note that this feature can be disabled from dev_tools, as its in fact behind a default feature there, being the feature bevy_ui_debug. # Limitations Currently, due to limitations with gizmos itself, it's not possible to support this feature to more the one window, so this tool is limited to the primary window only. # Showcase ![image](https://github.com/bevyengine/bevy/assets/126117294/ce9d70e6-0a57-4fa9-9753-ff5a9d82c009) Ui example with debug_overlay enabled ![image](https://github.com/bevyengine/bevy/assets/126117294/e945015c-5bab-4d7f-9273-472aabaf25a9) And disabled --------- Co-authored-by: Nicola Papale <nico@nicopap.ch> Co-authored-by: Pablo Reinhardt <pabloreinhardt@gmail.com> Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-03-18 18:11:06 +00:00
default = ["bevy_ui_debug"]
bevy_ci_testing = ["serde", "ron"]
Add a gizmo-based overlay to show UI node outlines (Adopted) (#11237) # Objective - This is an adopted version of #10420 - The objective is to help debugging the Ui layout tree with helpful outlines, that can be easily enabled/disabled ## Solution - Like #10420, the solution is using the bevy_gizmos in outlining the nodes --- ## Changelog ### Added - Added debug_overlay mod to `bevy_dev_tools` - Added bevy_ui_debug feature to `bevy_dev_tools` ## How to use - The user must use `bevy_dev_tools` feature in TOML - The user must use the plugin UiDebugPlugin, that can be found on `bevy::dev_tools::debug_overlay` - Finally, to enable the function, the user must set `UiDebugOptions::enabled` to true Someone can easily toggle the function with something like: ```rust fn toggle_overlay(input: Res<ButtonInput<KeyCode>>, options: ResMut<UiDebugOptions>) { if input.just_pressed(KeyCode::Space) { // The toggle method will enable if disabled and disable if enabled options.toggle(); } } ``` Note that this feature can be disabled from dev_tools, as its in fact behind a default feature there, being the feature bevy_ui_debug. # Limitations Currently, due to limitations with gizmos itself, it's not possible to support this feature to more the one window, so this tool is limited to the primary window only. # Showcase ![image](https://github.com/bevyengine/bevy/assets/126117294/ce9d70e6-0a57-4fa9-9753-ff5a9d82c009) Ui example with debug_overlay enabled ![image](https://github.com/bevyengine/bevy/assets/126117294/e945015c-5bab-4d7f-9273-472aabaf25a9) And disabled --------- Co-authored-by: Nicola Papale <nico@nicopap.ch> Co-authored-by: Pablo Reinhardt <pabloreinhardt@gmail.com> Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-03-18 18:11:06 +00:00
bevy_ui_debug = []
[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.15.0-dev" }
bevy_asset = { path = "../bevy_asset", version = "0.15.0-dev" }
bevy_color = { path = "../bevy_color", version = "0.15.0-dev" }
bevy_core = { path = "../bevy_core", version = "0.15.0-dev" }
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.15.0-dev" }
bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.15.0-dev" }
bevy_ecs = { path = "../bevy_ecs", version = "0.15.0-dev" }
bevy_gizmos = { path = "../bevy_gizmos", version = "0.15.0-dev" }
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.15.0-dev" }
bevy_input = { path = "../bevy_input", version = "0.15.0-dev" }
bevy_math = { path = "../bevy_math", version = "0.15.0-dev" }
bevy_reflect = { path = "../bevy_reflect", version = "0.15.0-dev" }
bevy_render = { path = "../bevy_render", version = "0.15.0-dev" }
bevy_time = { path = "../bevy_time", version = "0.15.0-dev" }
bevy_transform = { path = "../bevy_transform", version = "0.15.0-dev" }
bevy_ui = { path = "../bevy_ui", version = "0.15.0-dev", features = [
Fix crates not building individually (#12948) # Objective - `cargo check --workspace` appears to merge features and dependencies together, so it does not catch some issues where dependencies are not properly feature-gated. - The issues **are** caught, though, by running `cd $crate && cargo check`. ## Solution - Manually check each crate for issues. ```shell # Script used for i in crates/bevy_* do pushd $i cargo check popd done ``` - `bevy_color` had an issue where it used `#[derive(Pod, Zeroable)]` without using `bytemuck`'s `derive` feature. - The `FpsOverlayPlugin` in `bevy_dev_tools` uses `bevy_ui`'s `bevy_text` integration without properly enabling `bevy_text` as a feature. - `bevy_gizmos`'s `light` module was not properly feature-gated behind `bevy_pbr`. - ~~Lights appear to only be implemented in `bevy_pbr` and not `bevy_sprite`, so I think this is the right call. Can I get a confirmation by a gizmos person?~~ Confirmed :) - `bevy_gltf` imported `SmallVec`, but only used it if `bevy_animation` was enabled. - There was another issue, but it was more challenging to solve than the `smallvec` one. Run `cargo check -p bevy_gltf` and it will raise an issue about `animation_roots`. <details> <summary><code>bevy_gltf</code> errors</summary> ```shell error[E0425]: cannot find value `animation_roots` in this scope --> crates/bevy_gltf/src/loader.rs:608:26 | 608 | &animation_roots, | ^^^^^^^^^^^^^^^ not found in this scope warning: variable does not need to be mutable --> crates/bevy_gltf/src/loader.rs:1015:5 | 1015 | mut animation_context: Option<AnimationContext>, | ----^^^^^^^^^^^^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default For more information about this error, try `rustc --explain E0425`. warning: `bevy_gltf` (lib) generated 1 warning error: could not compile `bevy_gltf` (lib) due to 1 previous error; 1 warning emitted ``` </details> --- ## Changelog - Fixed `bevy_color`, `bevy_dev_tools`, and `bevy_gizmos` so they can now compile by themselves.
2024-04-14 00:06:03 +00:00
"bevy_text",
] }
bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" }
bevy_window = { path = "../bevy_window", version = "0.15.0-dev" }
bevy_text = { path = "../bevy_text", version = "0.15.0-dev" }
bevy_state = { path = "../bevy_state", version = "0.15.0-dev" }
# other
serde = { version = "1.0", features = ["derive"], optional = true }
ron = { version = "0.8.0", optional = true }
[lints]
workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["-Zunstable-options"]
all-features = true