forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bevy_dev_tools crate (bevyengine#11341)
# Objective - Resolves bevyengine#11309 ## Solution - Add `bevy_dev_tools` crate as a default feature. - Add `DevToolsPlugin` and add it to an app if the `bevy_dev_tools` feature is enabled. `bevy_dev_tools` is reserved by @alice-i-cecile, should we wait until it gets transferred to cart before merging? --------- Co-authored-by: Alice Cecile <[email protected]> Co-authored-by: BD103 <[email protected]>
- Loading branch information
1 parent
72fc7da
commit 306e686
Showing
16 changed files
with
99 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[package] | ||
name = "bevy_dev_tools" | ||
version = "0.14.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] | ||
bevy_ci_testing = ["serde", "ron"] | ||
|
||
[dependencies] | ||
# bevy | ||
bevy_app = { path = "../bevy_app", version = "0.14.0-dev" } | ||
bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" } | ||
bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev" } | ||
|
||
# other | ||
serde = { version = "1.0", features = ["derive"], optional = true } | ||
ron = { version = "0.8.0", optional = true } | ||
|
||
[lints] | ||
workspace = true |
2 changes: 1 addition & 1 deletion
2
crates/bevy_app/src/ci_testing.rs → crates/bevy_dev_tools/src/ci_testing.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org), | ||
//! focused on improving developer experience. | ||
use bevy_app::prelude::*; | ||
#[cfg(feature = "bevy_ci_testing")] | ||
pub mod ci_testing; | ||
|
||
/// Enables developer tools in an [`App`]. This plugin is added automatically with `bevy_dev_tools` | ||
/// feature. | ||
/// | ||
/// Warning: It is not recommended to enable this in final shipped games or applications. | ||
/// Dev tools provide a high level of access to the internals of your application, | ||
/// and may interfere with ordinary use and gameplay. | ||
/// | ||
/// To enable developer tools, you can either: | ||
/// | ||
/// - Create a custom crate feature (e.g "`dev_mode`"), which enables the `bevy_dev_tools` feature | ||
/// along with any other development tools you might be using: | ||
/// | ||
/// ```toml | ||
/// [feature] | ||
/// dev_mode = ["bevy/bevy_dev_tools", "other_dev_tools"] | ||
/// ``` | ||
/// | ||
/// - Use `--feature bevy/bevy_dev_tools` flag when using the `cargo run` command: | ||
/// | ||
/// `cargo run --features bevy/bevy_dev_tools` | ||
/// | ||
/// - Add the `bevy_dev_tools` feature to the bevy dependency in your `Cargo.toml` file: | ||
/// | ||
/// `features = ["bevy_dev_tools"]` | ||
/// | ||
/// Note: The third method is not recommended, as it requires you to remove the feature before | ||
/// creating a build for release to the public. | ||
pub struct DevToolsPlugin; | ||
|
||
impl Plugin for DevToolsPlugin { | ||
fn build(&self, _app: &mut App) { | ||
#[cfg(feature = "bevy_ci_testing")] | ||
{ | ||
ci_testing::setup_app(_app); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ crates=( | |
bevy_a11y | ||
bevy_ui | ||
bevy_winit | ||
bevy_dev_tools | ||
bevy_internal | ||
bevy_dylib | ||
bevy_color | ||
|