-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Added HeadlessPlugins (#15203)
#15260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
983e999 to
49e6b0f
Compare
|
Update because of typo |
alice-i-cecile
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including audio, input and dev tools in this set feels quite odd to me. The value for this plugin set is overwhelmingly on servers, which shouldn't benefit from any of those.
|
Good point, I have removed them from the list. |
| bevy_transform:::TransformPlugin, | ||
| bevy_hierarchy:::HierarchyPlugin, | ||
| bevy_diagnostic:::DiagnosticsPlugin, | ||
| bevy_a11y:::AccessibilityPlugin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility might be less common than the rest, I wonder if it's worth including by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should also be excluded: it's very much tied to input handling and UI.
|
@Wcubed once we cut |
| /// This plugin is included within `DefaultPlugins` and `MinimalPlugins` when the `bevy_ci_testing` | ||
| /// feature is enabled. It is recommended to only used this plugin during testing (manual or | ||
| /// This plugin is included within `DefaultPlugins`, `HeadlessPlugins` and `MinimalPlugins` | ||
| /// when the `bevy_ci_testing`feature is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// when the `bevy_ci_testing`feature is enabled. | |
| /// when the `bevy_ci_testing` feature is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed
|
Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1689 if you'd like to help out. |
|
I'm not sure this is a good idea to have in Bevy. "Headless" meaning will change depending on the use case, and controlling it with a plugin rather than features means longer compile time and a lot of code that can't be used, events not registered, component not reflected, but still available when developing which will mean a less good developer experience. |
|
Oh my gosh, why is this only behind a feature gate now? Is it still correct that to do a runtime headless you have to do this long mess of stuff? I was looking forward to not having to maintain the entire set of "everything that isn't rendering" just to have a switch for this. I guess this example is implying using DefaultPlugin with the ScheduleRunnerPlugin will get the same result? |
No, headless is just All the others are entirely dependent on what you're doing. In your list you've only selected some of the Bevy default plugins.
And no primary window. You can also decide to disable the winit and window plugins |
|
You're saying this is what I should do? |
Added a
HeadlessPluginsplugin group, that adds more default functionality (like logging) than theMinimumPlugins. Fixes #15203Changed the headless example to use the new plugin group.
I am not entirely sure if the list of plugins is correct. Are there ones that should be added / removed?
The
TerminalCtrlCHandlerPluginhas interesting effects in the headless example: Installing it a second time it will give a log message about skipping installation, because it is already installed. Ctrl+C will terminate the application in that case. However, not installing it the second time (so only on the app that runs once) has the effect that the app that runs continuously cannot be stopped using Ctrl+C.This implies that, even though the second app did not install the Ctrl+C handler, it did something because it was keeping the one from the first app alive.
Not sure if this is a problem or issue, or can be labeled a wierd quirk of having multiple Apps in one executable.