Skip to content

Commit

Permalink
add example how to turn off DevToolsPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
matiqo15 committed Jan 16, 2024
1 parent 39d2cba commit ea86fe0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/bevy_dev_tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ use bevy_app::prelude::*;
pub mod ci_testing;

/// Enables developer tools in an [`App`].
/// This plugin is part of the [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html), and enabled by default.
///
/// It's recommended to disable it in a release. To disable it, you can either:
///
/// - Remove it when adding [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html):
/// ```no_run
/// # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, PluginGroup};
/// # use bevy_dev_tools::{DevToolsPlugin};
/// fn main() {
/// App::new()
/// .add_plugins(DefaultPlugins.build().disable::<DevToolsPlugin>())
/// .run();
/// }
/// ```
///
/// - Disable the feature:
/// Disable default features from Bevy, and don't enable the feature `bevy_dev_tools`.
pub struct DevToolsPlugin;

impl Plugin for DevToolsPlugin {
Expand Down

0 comments on commit ea86fe0

Please sign in to comment.