Prevent save loss

Announcements, support questions, and discussion for the Dialogue System.
SealDev
Posts: 85
Joined: Thu Jun 24, 2021 5:45 am

Re: Prevent save loss

Post 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.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Prevent save loss

Post 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.
Post Reply