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
- NullReferenceException is thrown when assigning an Object to a custom DebugUI.ObjectField in Rendering Debugger
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
- Game view is rendered white when viewing the Editor with HDR display and Post Proccesing is enabled on the Main Camera with 2D URP
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.