From 8f31c09e60c50cb4e26bab4b556c19f16086b6e9 Mon Sep 17 00:00:00 2001 From: Elabajaba Date: Sat, 19 Oct 2024 17:44:02 -0400 Subject: [PATCH] Add docs for how to manually add a `WinitPlugin` to a `MinimalPlugins` setup. (#15989) # Objective Adding a `WinitPlugin` to a `MinimalPlugins` setup is a bit tricky and confusing due to having a terrible error message and no examples in the repo. ## Solution Document what you need to add. --- crates/bevy_winit/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index ac56798bc8..1ca101f6fd 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -59,6 +59,9 @@ mod winit_windows; /// /// The `T` event type can be used to pass custom events to the `winit`'s loop, and handled as events /// in systems. +/// +/// When using eg. `MinimalPlugins` you can add this using `WinitPlugin::::default()`, where +/// `WakeUp` is the default `Event` that bevy uses. #[derive(Default)] pub struct WinitPlugin { /// Allows the window (and the event loop) to be created on any thread