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(all(unix, not(target_os = "horizon")), windows)))]
23 bevy_app:::TerminalCtrlCHandlerPlugin,
24 #[cfg(feature = "bevy_asset")]
26 #[custom(cfg(any(feature = "http", feature = "https")))]
27 bevy_asset::io::web:::WebAssetPlugin,
28 #[cfg(feature = "bevy_asset")]
29 bevy_asset:::AssetPlugin,
30 #[cfg(feature = "bevy_scene")]
31 bevy_scene:::ScenePlugin,
32 #[cfg(feature = "bevy_winit")]
34 bevy_winit:::WinitPlugin,
35 #[custom(cfg(all(feature = "dlss", not(feature = "force_disable_dlss"))))]
36 bevy_anti_alias::dlss:::DlssInitPlugin,
37 #[cfg(feature = "bevy_render")]
38 bevy_render:::RenderPlugin,
39 #[cfg(feature = "bevy_image")]
42 bevy_image:::ImagePlugin,
43 #[cfg(feature = "bevy_mesh")]
44 bevy_mesh:::MeshPlugin,
45 #[cfg(feature = "bevy_camera")]
46 bevy_camera:::CameraPlugin,
47 #[cfg(feature = "bevy_light")]
48 bevy_light:::LightPlugin,
49 #[cfg(feature = "bevy_render")]
50 #[custom(cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded")))]
51 bevy_render::pipelined_rendering:::PipelinedRenderingPlugin,
52 #[cfg(feature = "bevy_core_pipeline")]
53 bevy_core_pipeline:::CorePipelinePlugin,
54 #[cfg(feature = "bevy_post_process")]
55 bevy_post_process:::PostProcessPlugin,
56 #[cfg(feature = "bevy_anti_alias")]
57 bevy_anti_alias:::AntiAliasPlugin,
58 #[cfg(feature = "bevy_sprite")]
59 bevy_sprite:::SpritePlugin,
60 #[cfg(feature = "bevy_sprite_render")]
61 bevy_sprite_render:::SpriteRenderPlugin,
62 #[cfg(feature = "bevy_text")]
63 bevy_text:::TextPlugin,
64 #[cfg(feature = "bevy_ui")]
65 bevy_ui:::UiPlugin,
66 #[cfg(feature = "bevy_ui_render")]
67 bevy_ui_render:::UiRenderPlugin,
68 #[cfg(feature = "bevy_pbr")]
69 bevy_pbr:::PbrPlugin,
70 #[cfg(feature = "bevy_gltf")]
73 bevy_gltf:::GltfPlugin,
74 #[cfg(feature = "bevy_audio")]
75 bevy_audio:::AudioPlugin,
76 #[cfg(feature = "bevy_gilrs")]
77 bevy_gilrs:::GilrsPlugin,
78 #[cfg(feature = "bevy_animation")]
79 bevy_animation:::AnimationPlugin,
80 #[cfg(feature = "bevy_gizmos")]
81 bevy_gizmos:::GizmoPlugin,
82 #[cfg(feature = "bevy_gizmos_render")]
83 bevy_gizmos_render:::GizmoRenderPlugin,
84 #[cfg(feature = "bevy_state")]
85 bevy_state::app:::StatesPlugin,
86 #[cfg(feature = "bevy_ci_testing")]
87 bevy_dev_tools::ci_testing:::CiTestingPlugin,
88 #[cfg(feature = "hotpatching")]
89 bevy_app::hotpatch:::HotPatchPlugin,
90 #[plugin_group]
91 #[cfg(feature = "bevy_picking")]
92 bevy_picking:::DefaultPickingPlugins,
93 #[doc(hidden)]
94 :IgnoreAmbiguitiesPlugin,
95 }
96 }
104
105#[derive(Default)]
106struct IgnoreAmbiguitiesPlugin;
107
108impl Plugin for IgnoreAmbiguitiesPlugin {
109 #[expect(
110 clippy::allow_attributes,
111 reason = "`unused_variables` is not always linted"
112 )]
113 #[allow(
114 unused_variables,
115 reason = "The `app` parameter is used only if a combination of crates that contain ambiguities with each other are enabled."
116 )]
117 fn build(&self, app: &mut bevy_app::App) {
118 #[cfg(all(feature = "bevy_animation", feature = "bevy_ui"))]
120 if app.is_plugin_added::<bevy_animation::AnimationPlugin>()
121 && app.is_plugin_added::<bevy_ui::UiPlugin>()
122 {
123 app.ignore_ambiguity(
124 bevy_app::PostUpdate,
125 bevy_animation::advance_animations,
126 bevy_ui::ui_layout_system,
127 );
128 app.ignore_ambiguity(
129 bevy_app::PostUpdate,
130 bevy_animation::animate_targets,
131 bevy_ui::ui_layout_system,
132 );
133 }
134 }
135}
136
137plugin_group! {
138 pub struct MinimalPlugins {
140 bevy_app:::TaskPoolPlugin,
141 bevy_diagnostic:::FrameCountPlugin,
142 bevy_time:::TimePlugin,
143 bevy_app:::ScheduleRunnerPlugin,
144 #[cfg(feature = "bevy_ci_testing")]
145 bevy_dev_tools::ci_testing:::CiTestingPlugin,
146 }
147 }