Skip to content

Commit ea86fe0

Browse files
committed
add example how to turn off DevToolsPlugin
1 parent 39d2cba commit ea86fe0

File tree

1 file changed

+17
-0
lines changed
  • crates/bevy_dev_tools/src

1 file changed

+17
-0
lines changed

crates/bevy_dev_tools/src/lib.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ use bevy_app::prelude::*;
77
pub mod ci_testing;
88

99
/// Enables developer tools in an [`App`].
10+
/// This plugin is part of the [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html), and enabled by default.
11+
///
12+
/// It's recommended to disable it in a release. To disable it, you can either:
13+
///
14+
/// - Remove it when adding [`DefaultPlugins`](https://docs.rs/bevy/latest/bevy/struct.DefaultPlugins.html):
15+
/// ```no_run
16+
/// # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, PluginGroup};
17+
/// # use bevy_dev_tools::{DevToolsPlugin};
18+
/// fn main() {
19+
/// App::new()
20+
/// .add_plugins(DefaultPlugins.build().disable::<DevToolsPlugin>())
21+
/// .run();
22+
/// }
23+
/// ```
24+
///
25+
/// - Disable the feature:
26+
/// Disable default features from Bevy, and don't enable the feature `bevy_dev_tools`.
1027
pub struct DevToolsPlugin;
1128

1229
impl Plugin for DevToolsPlugin {

0 commit comments

Comments
 (0)