Search Issue Tracker
Won't Fix
Votes
1
Found in [Package]
2.0.3
Issue ID
ADDR-3237
Regression
No
InvalidKeyException thrown when using Addressables.LoadAssetsAsync<T> to load sub-type objects
Reproduction steps:
1. Open the attached project “AddressablesBatchLoadBug”
2. Enter Play mode
Expected result: There are no errors in the Console
Actual result: UnityEngine.AddressableAssets.InvalidKeyException is thrown
Reproducible with: 1.20.5 (2020.3.46f1, 2021.3.20f1), 1.21.8 (2022.2.10f1, 2023.1.0b7, 2023.2.0a5)
Reproducible on: macOS 12.4 (Intel), macOS 13.2.1 (M1) (user’s)
Workaround: use LoadResourceLocations first, then call Addressables.LoadAssetAsync<Base>() on each individual location
Full error:
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Asset found with for Key=Base. Key exists as multiple Types=SO.Sub1, SO.Sub2, which is not assignable from the requested Type=SO.Base
UnityEngine.AddressableAssets.Addressables:LoadAssetsAsync<SO.Base> (System.Collections.IEnumerable,System.Action`1<SO.Base>,UnityEngine.AddressableAssets.Addressables/MergeMode)
Loading.Loader:Awake () (at Assets/Scripts/Loading/Loader.cs:13)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note:
Thank you for reporting a bug to Unity.
We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.