-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Can not easily opt out of rendering UI on a camera #16247
Description
Bevy version 0.14.2
What you did
I want to provide users a plugin to debug their UI. Think chrome dev tools for bevy UI.
I also want to use gizmos to add some guides on where the currently inspected element is positioned on screen.
Gizmos are rendering behind the UI by default.
If I want the gizmos to render on top, I need to add an extra camera for my plugin with a higher Order.
The DefaultUiCamera System param defaults to the camera with the highest order.
I can't provide a plugin that renders gizmos on top of the users UI, as there is a high chance that the plugin's camera will be the default ui camera.
What went wrong
If a plugin spawns a camera with a higher than default order, there is a big chance it will be the DefaultUiCamera.
-
what were you expecting?
I want to opt out of any UI not explicitly targeting this camera. -
what actually happened?
I need to request the user to set the IsDefaultUiCamera on there preferred camera.
Additional information
Related discussion on #ui-dev in discord:https://discord.com/channels/691052431525675048/743663673393938453/1303324220608217169