Hi Tony,
I've moved my levels into addressables and wondered if your save/load system inside the Dialogue system has any support for that?
If so, how is it implemented?
Addressables during save/load?
Re: Addressables during save/load?
Hi,
Are you talking about actual scene files?
What's the reason for moving them into Addressables, unless you're pulling them in from a source external to the build?
The Dialogue System's save system uses SceneManager.LoadSceneAsync, so as long as your system is fine with that, then there should be no problem.
Are you talking about actual scene files?
What's the reason for moving them into Addressables, unless you're pulling them in from a source external to the build?
The Dialogue System's save system uses SceneManager.LoadSceneAsync, so as long as your system is fine with that, then there should be no problem.
Re: Addressables during save/load?
There was a couple reasons to move to addressables. Mostly for the memory savings because Unity's horrible shader management. But also to allow for player modding of my game.
The load command for addressables is
Addressables.LoadSceneAsync(scene, LoadSceneMode.Single).Completed += SceneLoadComplete;
which is a different one from SceneManager.LoadSceneAsync.
The load command for addressables is
Addressables.LoadSceneAsync(scene, LoadSceneMode.Single).Completed += SceneLoadComplete;
which is a different one from SceneManager.LoadSceneAsync.
Re: Addressables during save/load?
I'll look toward supporting that in a future update. In the meantime, you could modify SaveSystem.cs and replace the SceneManager calls with Addressables calls.
Re: Addressables during save/load?
that's a perfect solution. I need a bool anyway because some levels still load the old fashioned way.
Thanks Tony!
Thanks Tony!
Re: Addressables during save/load?
Sounds good. This way SaveSystem wraps up the underlying load method (Addressables or SceneManager) so you don't have to think about it.
Version 2.2.12 just wrapped up and should be on the Asset Store in the next few days. I'll try to schedule this addition into version 2.3 if possible.
Version 2.2.12 just wrapped up and should be on the Asset Store in the next few days. I'll try to schedule this addition into version 2.3 if possible.
Re: Addressables during save/load?
Tony, where should I save the bool so I know it hits the right load command?
Re: Addressables during save/load?
Hi,
I haven't yet worked out the details of how I plan to implement it. But, off the top of my head, I might use the scripting define symbol USE_ADDRESSABLES to try addressables first. Maybe write two versions of the LoadSceneInternal(string sceneName) method:
I haven't yet worked out the details of how I plan to implement it. But, off the top of my head, I might use the scripting define symbol USE_ADDRESSABLES to try addressables first. Maybe write two versions of the LoadSceneInternal(string sceneName) method:
Code: Select all
#if USE_ADDRESSABLES
private static IEnumerator LoadSceneInternal(string sceneName)
{
... (try using addressables; failing that, use SceneManager) ...
}
#else
private static IEnumerator LoadSceneInternal(string sceneName)
{
... (original method in SaveSystem.cs) ...
}
#endif