diff --git a/crates/bevy_asset/src/asset_server.rs b/crates/bevy_asset/src/asset_server.rs index 7edbd337b64f3..0f4ae4081ab67 100644 --- a/crates/bevy_asset/src/asset_server.rs +++ b/crates/bevy_asset/src/asset_server.rs @@ -477,7 +477,7 @@ impl AssetServer { } } - let _ = assets.set(result.id, result.asset); + let _ = assets.set(result.id, *result.asset); } Ok(AssetLifecycleEvent::Free(handle_id)) => { if let HandleId::AssetPathId(id) = handle_id { diff --git a/crates/bevy_asset/src/loader.rs b/crates/bevy_asset/src/loader.rs index aa0f3cd009b5a..cf50622711dba 100644 --- a/crates/bevy_asset/src/loader.rs +++ b/crates/bevy_asset/src/loader.rs @@ -139,7 +139,7 @@ impl<'a> LoadContext<'a> { /// The result of loading an asset of type `T` #[derive(Debug)] pub struct AssetResult { - pub asset: T, + pub asset: Box, pub id: HandleId, pub version: usize, } @@ -168,7 +168,7 @@ impl AssetLifecycle for AssetLifecycleChannel { self.sender .send(AssetLifecycleEvent::Create(AssetResult { id, - asset: *asset, + asset, version, })) .unwrap()