From f613c450bced814fb07123f19fdf3f3180046481 Mon Sep 17 00:00:00 2001 From: Zachary Harrold Date: Thu, 23 Nov 2023 00:39:44 +1100 Subject: [PATCH] Fix Asset Loading Bug (#10698) # Objective - Fixes #10695 ## Solution Fixed obvious blunder in `PartialEq` implementation for `UntypedAssetId`'s where the `TypeId` was not included in the comparison. This was not picked up in the unit tests I added because they only tested over a single asset type. --- crates/bevy_asset/src/id.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_asset/src/id.rs b/crates/bevy_asset/src/id.rs index a75ae3858e..db641d4fb2 100644 --- a/crates/bevy_asset/src/id.rs +++ b/crates/bevy_asset/src/id.rs @@ -271,7 +271,7 @@ impl Display for UntypedAssetId { impl PartialEq for UntypedAssetId { #[inline] fn eq(&self, other: &Self) -> bool { - self.internal().eq(&other.internal()) + self.type_id() == other.type_id() && self.internal().eq(&other.internal()) } }