mirror of
https://github.com/bevyengine/bevy
synced 2024-12-26 21:13:09 +00:00
7154b59438
# Objective Continue #7867 now that we have URect #7984 - Return `URect` instead of `(UVec2, UVec2)` in `Camera::physical_viewport_rect` - Add `URect` and `IRect` to prelude ## Changelog - Changed `Camera::physical_viewport_rect` return type from `(UVec2, UVec2)` to `URect` - `URect` and `IRect` were added to prelude ## Migration Guide Before: ```rust fn view_physical_camera_rect(camera_query: Query<&Camera>) { let camera = camera_query.single(); let Some((min, max)) = camera.physical_viewport_rect() else { return }; dbg!(min, max); } ``` After: ```rust fn view_physical_camera_rect(camera_query: Query<&Camera>) { let camera = camera_query.single(); let Some(URect { min, max }) = camera.physical_viewport_rect() else { return }; dbg!(min, max); } ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |