bevy_internal/
default_plugins.rs1use bevy_app::{plugin_group, Plugin};
2
3plugin_group! {
4 pub struct DefaultPlugins {
6 bevy_app:::PanicHandlerPlugin,
7 #[cfg(feature = "bevy_log")]
8 bevy_log:::LogPlugin,
9 bevy_app:::TaskPoolPlugin,
10 bevy_diagnostic:::FrameCountPlugin,
11 bevy_time:::TimePlugin,
12 bevy_transform:::TransformPlugin,
13 bevy_diagnostic:::DiagnosticsPlugin,
14 bevy_input:::InputPlugin,
15 #[custom(cfg(not(feature = "bevy_window")))]
16 bevy_app:::ScheduleRunnerPlugin,
17 #[cfg(feature = "bevy_window")]
18 bevy_window:::WindowPlugin,
19 #[cfg(feature = "bevy_window")]
20 bevy_a11y:::AccessibilityPlugin,
21 #[cfg(feature = "std")]
22 #[custom(cfg(any(unix, windows)))]
23 bevy_app:::TerminalCtrlCHandlerPlugin,
24 #[cfg(feature = "bevy_asset")]
25 bevy_asset:::AssetPlugin,
26 #[cfg(feature = "bevy_scene")]
27 bevy_scene:::ScenePlugin,
28 #[cfg(feature = "bevy_winit")]
29 bevy_winit:::WinitPlugin,
30 #[cfg(feature = "bevy_render")]
31 bevy_render:::RenderPlugin,
32 #[cfg(feature = "bevy_render")]
35 bevy_render::texture:::ImagePlugin,
36 #[cfg(feature = "bevy_render")]
37 #[custom(cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded")))]
38 bevy_render::pipelined_rendering:::PipelinedRenderingPlugin,
39 #[cfg(feature = "bevy_core_pipeline")]
40 bevy_core_pipeline:::CorePipelinePlugin,
41 #[cfg(feature = "bevy_sprite")]
42 bevy_sprite:::SpritePlugin,
43 #[cfg(feature = "bevy_text")]
44 bevy_text:::TextPlugin,
45 #[cfg(feature = "bevy_ui")]
46 bevy_ui:::UiPlugin,
47 #[cfg(feature = "bevy_pbr")]
48 bevy_pbr:::PbrPlugin,
49 #[cfg(feature = "bevy_gltf")]
52 bevy_gltf:::GltfPlugin,
53 #[cfg(feature = "bevy_audio")]
54 bevy_audio:::AudioPlugin,
55 #[cfg(feature = "bevy_gilrs")]
56 bevy_gilrs:::GilrsPlugin,
57 #[cfg(feature = "bevy_animation")]
58 bevy_animation:::AnimationPlugin,
59 #[cfg(feature = "bevy_gizmos")]
60 bevy_gizmos:::GizmoPlugin,
61 #[cfg(feature = "bevy_state")]
62 bevy_state::app:::StatesPlugin,
63 #[cfg(feature = "bevy_dev_tools")]
64 bevy_dev_tools:::DevToolsPlugin,
65 #[cfg(feature = "bevy_ci_testing")]
66 bevy_dev_tools::ci_testing:::CiTestingPlugin,
67 #[plugin_group]
68 #[cfg(feature = "bevy_picking")]
69 bevy_picking:::DefaultPickingPlugins,
70 #[doc(hidden)]
71 :IgnoreAmbiguitiesPlugin,
72 }
73 }
81
82#[derive(Default)]
83struct IgnoreAmbiguitiesPlugin;
84
85impl Plugin for IgnoreAmbiguitiesPlugin {
86 #[expect(
87 clippy::allow_attributes,
88 reason = "`unused_variables` is not always linted"
89 )]
90 #[allow(
91 unused_variables,
92 reason = "The `app` parameter is used only if a combination of crates that contain ambiguities with each other are enabled."
93 )]
94 fn build(&self, app: &mut bevy_app::App) {
95 #[cfg(all(feature = "bevy_animation", feature = "bevy_ui"))]
97 if app.is_plugin_added::<bevy_animation::AnimationPlugin>()
98 && app.is_plugin_added::<bevy_ui::UiPlugin>()
99 {
100 app.ignore_ambiguity(
101 bevy_app::PostUpdate,
102 bevy_animation::advance_animations,
103 bevy_ui::ui_layout_system,
104 );
105 app.ignore_ambiguity(
106 bevy_app::PostUpdate,
107 bevy_animation::animate_targets,
108 bevy_ui::ui_layout_system,
109 );
110 }
111 }
112}
113
114plugin_group! {
115 pub struct MinimalPlugins {
117 bevy_app:::TaskPoolPlugin,
118 bevy_diagnostic:::FrameCountPlugin,
119 bevy_time:::TimePlugin,
120 bevy_app:::ScheduleRunnerPlugin,
121 #[cfg(feature = "bevy_ci_testing")]
122 bevy_dev_tools::ci_testing:::CiTestingPlugin,
123 }
124 }