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
- [Android][iOS] The keyboard closes and re-opens when consecutive input fields are selected
- Complex Sub Graph connected to a Voronoi node is ignored when the shader gets applied as a Material
- Compute Shader property not set error when entering play mode with path tracing and PBR sky
- "WebGL Publish" detects WebGL module and allows building when it is installed without restarting the project
- Editor is non-responsive and flickers when multiple Water System instances are enabled
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.