2024-03-06 20:33:05 +00:00
|
|
|
//! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org),
|
|
|
|
//! focused on improving developer experience.
|
2024-03-08 20:03:09 +00:00
|
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
2024-03-06 20:33:05 +00:00
|
|
|
|
|
|
|
use bevy_app::prelude::*;
|
2024-03-11 19:26:14 +00:00
|
|
|
|
2024-03-06 20:33:05 +00:00
|
|
|
#[cfg(feature = "bevy_ci_testing")]
|
|
|
|
pub mod ci_testing;
|
2024-03-11 19:26:14 +00:00
|
|
|
pub mod fps_overlay;
|
2024-03-06 20:33:05 +00:00
|
|
|
|
|
|
|
/// 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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|