How to switch addressable scenes correctly?

Let’s say we want to switch from our game scene to the main menu scene (both addressable)
Now if calling Addressables.UnloadSceneAsync (assuming we have some more other scenes open), there is some strange artifacting - i.e. textures becoming black etc.
However if we just call Addressables.LoadSceneAsync with LoadSceneMode.Single the AsyncOperationHandle of the game scene gets never unloaded (or that is our assumption)?

So what is the correct way to switch from one scene to another without unloading assets that are still being displayed?

I think you don’t need to call UnloadSceneAsync when launching a new scene in LoadSceneMode.Single - I have tested this in profiler and looks like the memory is properly released, but not 100% sure, someone should confirm.

At least for the version we’re using, this is what the documentation says:

https://docs.unity3d.com/Packages/com.unity.addressables@1.16/manual/MemoryManagement.html

So i did some further experimentation and even when only using Addressables.LoadSceneAsync with LoadSceneMode.Single, there is strange artifacting going on (i.e. textures going black, materials going pink etc). Also certain scripts will fail because they depend on addressable assets in the update function (for example materials) - those are being pulled away while the scripts keep running.

So the question still remains, how can we switch between 2 scenes without artifacts / causing script exceptions due to adressables being disposed?

Do you have an example project with this behavior? I’m curious what the script exceptions would look like. My team has been using LoadSceneAsync() fine so far with LoadSceneMode.Single. We utilize a loading screen to hide the transition between scenes.

I was able to track the problem down and it was not the fault of Addressables.LoadSceneAsync
Instead we were calling:

Addressables.Release(sceneLoadHandle);

But releasing the scene load handles causes the strange behaviour. Instead not releasing the load handles and only using LoadSceneAsync does the trick (no strange artifacts / addressables being disposed)