Closed ptsd closed 2 days ago
As of bevy 0.15 there are some changes to the ExtractComponent stuff that will require some rework of EguiNode and EguiRenderToTextureNode.
ExtractComponent
EguiNode
EguiRenderToTextureNode
Relevant migration doc
I don't have enough understanding of the bevy pipeline to fully grok the nuance, but essentialy this query:
impl Node for EguiNode { fn update(&mut self, world: &mut World) { ... let mut render_target_query = world.query::<(&EguiSettings, &RenderTargetSize, &mut EguiRenderOutput)>(); let Ok((egui_settings, window_size, mut render_output)) = render_target_query.get_mut(world, self.window_entity) else { return; };
will now never match anything and thus never run the Node logic for painting egui.
Node
Instead something must match up the two worlds eg:
if self.main_world_entity.is_none() { for (entity, main_entity) in world.query::<(Entity, &MainEntity)>().iter(world) { if main_entity.id() == self.window_entity { self.main_world_entity = Some(entity.clone()); break; } } } let Some(found_main_entity) = self.main_world_entity else { return; }; ... render_target_query.get_mut(world, found_main_entity)
I am 100% sure there is a far better way to achieve this, but a POC that works for at least non render_to_texture stuff is available at https://github.com/ptsd/bevy_egui/tree/bevy-0.15.
Hope that helps π
The update with Bevy 0.15 is now released. Thank you!
As of bevy 0.15 there are some changes to the
ExtractComponent
stuff that will require some rework ofEguiNode
andEguiRenderToTextureNode
.Relevant migration doc
I don't have enough understanding of the bevy pipeline to fully grok the nuance, but essentialy this query:
will now never match anything and thus never run the
Node
logic for painting egui.Instead something must match up the two worlds eg:
I am 100% sure there is a far better way to achieve this, but a POC that works for at least non render_to_texture stuff is available at https://github.com/ptsd/bevy_egui/tree/bevy-0.15.
Hope that helps π