AFAIK, both:
- var result = Addressables.LoadAsset(label)
- var result = Addressables.LoadResourceLocations(label)
Triggers an exception when you run it on a label that’s valid but not used by any items in the build. (eg. label.RuntimeKeyIsValid() would be true here)
The difference is latter somehow still works and allow me await result.Task to see if result.Status is ok. While the former just stops Addressable loading altogether.
I am not sure if I encountered a bug with Addressables.LoadResourceLocations, or misused it for label, either way, seems like we need a proper way to check label in exists in build in addition to key.
(Personally I don’t mind getting an actual Exception, for example from calling
Addressables.LoadAssets(label) with a valid label not in the build*,* it’s not nice but still workable.)
(The problem comes when we triggers an Exception but Addressable doesn’t throw it to us, and instead just LogException. This means we can’t try/catch to recover from it.)