Reset entire Addressables system at runtime

How can I reset the addressables system entirely, unloading all assets from memory and un-initializing the system so it is ready to go again.

I want to be able to “soft restart” the game and have the game start again from the start as if it was just launched. I am cleaning up all of my stuff but I can’t figure out how to “clean up” addressables.

2 Likes

Bump

Bump

bump

I’m not too sure about de-initializing Addressables itself, but the best way to ‘soft reset’ your game is to do what’s considered a ‘destructive’ scene load operation. This is when you load a scene like so:

public IEnumerator SoftReset()
{
    yield return SceneManager.LoadSceneAsync(sceneName: "MainMenu",
                                             mode: LoadSceneMode.Single);

    var cleanupOp = Resources.UnloadUnusedAssets();

    while (!cleanupOp.isDone) yield return null;
}

Depending on how much stuff is in memory, the Resources.UnloadUnusedAssets call will take a bit of time. But this will unload, de-reference and clean up anything that isn’t in DontDestroyOnLoad or the “MainMenu” scene.

Any update has come on this feature, restart addressables.

Bump

I also wonder,Is there any way to solve it?

I flagged this for the team, and they are going to investigate.

5 Likes