Addressables doesn't work in windows standalone

Hello guys, I started working with addressables and everything was fine until I decided to build a standalone build. It simply did not work there. My further investigation tells me that OnCompleted callback never happens.

private void Start() {
      Addressables.LoadAsset<Sprite>("resource_wood").Completed += OnCompleted;
}

private void OnCompleted(AsyncOperationHandle<Sprite> obj) {
     m_image.sprite = obj.Result;
}

I think I missed something, but I’ve tried everything that I could. As I said it works perfectly in unity editor but doesn’t work in standalone.

unity 2019.3.7f1
addressables 1.1.10

Any idea what I did wrong?

Have you done the build content thing in the addressable window? The button at the top right.

5676937--591958--Screenshot_18.png
yes I did it and tried it with all modes
5676937--591961--Screenshot_19.png

Any reason to not update? You’re on a pretty old version, maybe it’ll magically fix it?

1 Like

It was the version that package manager shows by default, and was not the upgrade button, I updated to the last 1.7.5 version, but the problem still was there.
Finally, I realized what was the problem, I used Addressables probably not how it supposed to be. If you load content in standalone build in
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
private static void Init() {

[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
private static void Init() {
}

addressables just silently dies, no callbacks, no exceptions, etc. I know it was weird to use it like that, but still, it would be nice to get some feedback from addressables in such a case.

1 Like