#Access to window in world scope

4 messages · Page 1 of 1 (latest)

exotic folio
#

I want to get access to the window in a world scope to use window.height() and window.width(). But I don't know how to do this. I have this world.resource_scope already with one resource that I need, and I would like to use window_query: Query<&Window, With<PrimaryWindow>>, aswell. Does anyone know how to do this?

world.resource_scope(|world, mut sum_resource: Mut<SumAnswer>| {
faint patio
#

If you have Commands in your SystemStatedon't forget to apply them to the world at the end: system_state.apply(world);