mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
306c1ac617
# Objective Following discussion on #3536 and #3522, `Handle::as_weak()` takes a type `U`, reinterpreting the handle as of another asset type while keeping the same ID. This is mainly used today in font atlas code. This PR does two things: - Rename the method to `cast_weak()` to make its intent more clear - Actually change the type uuid in the handle if it's not an asset path variant. ## Migration Guide - Rename `Handle::as_weak` uses to `Handle::cast_weak` The method now properly sets the associated type uuid if the handle is a direct reference (e.g. not a reference to an `AssetPath`), so adjust you code accordingly if you relied on the previous behavior. |
||
---|---|---|
.. | ||
button.rs | ||
font_atlas_debug.rs | ||
text.rs | ||
text_debug.rs | ||
transparency_ui.rs | ||
ui.rs | ||
ui_scaling.rs |