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 afd5663
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, and enabled by default.
///
/// It's recommended to disable it in a release. To disable it, you can either:
///
/// - Remove it when adding DefaultPlugins:
/// ```no_run
/// use bevy_app::{App, NoopPluginGroup as DefaultPlugins};
/// 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 afd5663

Please sign in to comment.