diff --git a/crates/bevy_internal/src/default_plugins.rs b/crates/bevy_internal/src/default_plugins.rs index 950f984a64011..d6e588ede1491 100644 --- a/crates/bevy_internal/src/default_plugins.rs +++ b/crates/bevy_internal/src/default_plugins.rs @@ -119,4 +119,17 @@ plugin_group! { /// It includes a [schedule runner (`ScheduleRunnerPlugin`)](crate::app::ScheduleRunnerPlugin) /// to provide functionality that would otherwise be driven by a windowed application's /// *event loop* or *message loop*. + /// + /// By default, this loop will run as fast as possible, which can result in high CPU usage. + /// You can add a delay using [`run_loop`](crate::app::ScheduleRunnerPlugin::run_loop), + /// or remove the loop using [`run_once`](crate::app::ScheduleRunnerPlugin::run_once). + /// # Example: + /// ```rust, no_run + /// # use std::time::Duration; + /// # use bevy_app::{App, PluginGroup, ScheduleRunnerPlugin}; + /// # use bevy_internal::MinimalPlugins; + /// App::new().add_plugins(MinimalPlugins.set(ScheduleRunnerPlugin::run_loop( + /// // Run 60 times per second. + /// Duration::from_secs_f64(1.0 / 60.0), + /// ))).run(); }