Navigathena
Navigathena copied to clipboard
[FEATURE] OnUnload or a way to know if the scene will be unloaded in OnFinalize
Feature destription
So I have a problem when I'm:
- Preloading assets with OnInitialize
- Releasing them in OnFinalize ...for a persistent scene, in which it OnFinalize also get called when pushing in a new scene
Can you provide more details?
Wait, I'm sorry, I misunderstood the package. It seems like Navigathena doesn't support additive scenes. I thought:
- Push/Pop: Doesn't unload the previous scene
- Change: Unloads all scenes and loads the target scene
- Replace: Unloads the top scene and loads the target scene
- Reload: Reload head scene (keep all previous scene intact)
Based on that, how would you handle additive scenes? Should I just use Unity's built-in SceneManager? Because if I do, I will lose Navigathena's lifecycle events.
I just realize, in my Splash scene:
await Addressables.LoadSceneAsync("Levels/Core/Core.unity");
And on my Core's ISceneEntryPoint.OnEnter
GlobalSceneNavigator.Instance.Change(new AddressableSceneIdentifier("Levels/MainMenu/MainMenu.unity"));
This code unload my Core scene, is this normal behaviour?