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
- UI Overlay Image gets darker on each Camera when multiple Cameras are used
- Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL error when opening the standalone profiler window
- Disabled assets in Import Unity Package window aren't tracked but count as being selected by user
- [Windows] Crash on GetManagerFromContext when video is playing and creating High Definition 3D Projects after FMOD failed to switch back to normal output Error appeared
- GC Alloc produced when adding items to MultiColumnListView with Auto Assign Binding
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.