Addressables.LoadSceneAsync Breaks with Domain Reloading Disabled

When I try to load a scene via the addressables system it loads correctly the first time, but when I run play mode again it will not load (stuck at 0 percent), until I force a domain reload by editing script or something.

Maybe not relevant but when I try to activate the unloaded scene I get this error:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.ResourceManagement.ResourceProviders.SceneInstance.Activate () (at Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs:27)

Saw someone else was having the same problem a few months back here (he has provided code), but did not see a response or solve:
Addressables are here! page-9#post-5398932

Edit: This only happens when the activateOnLoad parameter is false. I am using LoadSceneMode.Single. Manually activating the scene after load does not prevent this bug.

Thanks for the report! I’ll flag for the team.Which version of Addressables are you using?

Additionally, if you haven’t yet, please file a bug report for us as well: Unity QA: Building quality with passion

I tried this on 1.1.10 and 1.83, same problem with both

Edit: Found out that calling Addressables.InitializeAsync() before using the system prevents the issue from happening.

1 Like

Looks like Addressables.InitializeAsync() doesn’t band-aid issues with Domain Reloading off and Addressables.InstantiateAsync() - on non-reloaded re-launch I am getting missing reference exceptions when operating on the result of the complete callback of AsyncOperationHandle

UnityEngine.MissingReferenceException: The object of type ‘GameObject’ has been destroyed but you are still trying to access it.

3 Likes

I have the same problem as OP. I am on Unity 2020.2.0f1, Addressables: 1.16.15

1 Like