bevy/crates/bevy_asset/src
andriyDev 38058965ef
Restructure the logic in AssetServer::load_internal to avoid using weak handles. (#19634)
# Objective

- A step towards #19024.
- The logic here was kinda complex before.

## Solution

- I've restructured the logic here while preserving the behavior (as far
as I can tell).
- We no longer return the handle if it was passed in. The caller should
already have access to it, and the returned handle will be a weak
handle, not a strong handle (which can cause issues). This prevents us
from needing weak handles at all here.
- I verified the callers do not need the return value. The only callsite
that needs the returned handle does not pass in the input_handle
argument.

## Testing

- CI
2025-06-30 22:39:59 +00:00
..
io bevy_asset: fix clippy in wasm (#19865) 2025-06-29 20:36:53 +00:00
processor Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
server Restructure the logic in AssetServer::load_internal to avoid using weak handles. (#19634) 2025-06-30 22:39:59 +00:00
asset_changed.rs Remove 's lifetime from WorldQuery::Fetch (#19720) 2025-06-19 00:58:21 +00:00
assets.rs Add get_mut_untracked to Assets (#19487) 2025-06-04 16:34:27 +00:00
direct_access_ext.rs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
event.rs Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
folder.rs Fill out some missing docs for bevy_assets (#17829) 2025-02-13 21:08:09 +00:00
handle.rs Deprecated Begone! 0.16 Cleanup (#19108) 2025-05-07 18:17:41 +00:00
id.rs Added derive Reflect to UntypedHandle and UntypedAssetId (#18827) 2025-04-28 21:46:36 +00:00
lib.rs Fix some typos (#19788) 2025-06-23 22:32:46 +00:00
loader_builders.rs Revert PR #15481 to resolve a regression. (#18567) 2025-03-27 21:32:01 +00:00
loader.rs Fix LoadContext docs. (#19610) 2025-06-13 03:48:55 +00:00
meta.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
path.rs Remove apostrophes in possessive its (#19244) 2025-05-26 19:53:14 +00:00
reflect.rs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
render_asset.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
saver.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
transformer.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00