Page 2 of 2

Re: Prevent save loss

Posted: Sun Aug 07, 2022 6:48 am
by SealDev
After a bunch of testing, I got it to work by using playerprefs strings.

It even loads that level on the sequencer command LoadLevel failure.
But I don't think this is intended? Previously if a loadlevel failed, it would do nothing, and that makes sense than teleporting all the way to another level.

I assume LoadLevel also invokes validateNameScene. Could it be decoupled? It's just a nitpick of course, you don't have to do it.

Re: Prevent save loss

Posted: Sun Aug 07, 2022 10:31 am
by Tony Li
That is a really good point. I imagine may devs would still want the delegate to be called for LoadLevel(). Instead, I'll add another parameter to the delegate that specifies why it's being called (loading a saved game, or just changing scenes, etc.). This way your method can decide what to do.