-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
UiPlugin cannot be used without rendering #3815
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
Comments
For headless testing of UI, see the example in this pull request for adding headless windows: #3835 |
Just started learning Bevy and Rust, where should I start for this issue? |
Thanks @YourAlly :) So, the steps I would take are:
https://doc.rust-lang.org/cargo/reference/features.html is a useful learning resource here; you can see how to use feature flags to conditionally enable compilation of certain code segments. Feel free to check in with me or report back on this thread if you get stuck. |
|
The simple UI test provided in #3835 (check if button is centered in a window without a window) passes with rendering disabled by preventing
from loading when I bet those |
Not just without rendering, but it would be great to be able to use UI with a custom non-wgpu based renderer. That way projects can use bevy_ui and bevy_ui-based crates without any logic, styling, event handling, etc changes, and without needing to write their own UI and layout system, but still being able to use their own renderer and just write a simple system to query the list of finalized nodes to build draw calls for. |
Bevy version
0.6
What you did
What actually happened
This panic is in
bevy/crates/bevy_ui/src/render/mod.rs
Line 61 in 458cb7a
Additional information
Related to #3155.
This is essential for headless integration testing of UI logic.
The text was updated successfully, but these errors were encountered: