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
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
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.