Visual Novel template - Continue button available even when no saves in slot

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lostmushroom
Posts: 208
Joined: Mon Jul 01, 2019 1:21 pm

Visual Novel template - Continue button available even when no saves in slot

Post by lostmushroom »

Hey Tony. I'm having an issue with the visual novel template with save slots. I cleared all my saved slots, but the Continue button in Start scene still shows up. When you click it, you get an empty scene and a warning:

Save System: LoadFromSlot(3) but there is no saved game in this slot.

The Restart button is also showing up when there aren't any saves, which doesn't cause any issues, but seems like it shouldn't be there.
User avatar
Tony Li
Posts: 23143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Visual Novel template - Continue button available even when no saves in slot

Post by Tony Li »

Hi,

When the VN template's SaveHelper component saves a game, it records the saved game ID in PlayerPrefs.

The Continue button becomes visible when this PlayerPrefs key is set.

If you inspect the PlayerPrefsSavedGameDataStorer component, you can delete the saved games but it won't delete the PlayerPrefs key. This shouldn't happen to players, though, since they don't have access to the PlayerPrefsSavedGameDataStorer inspector. Two solutions for the Unity editor's play mode:

1. Remove the PlayerPrefs key using something like PlayerPrefs Editor.

2. Or save a new saved game in the slot and then delete it through the VN template's menu at runtime.
lostmushroom
Posts: 208
Joined: Mon Jul 01, 2019 1:21 pm

Re: Visual Novel template - Continue button available even when no saves in slot

Post by lostmushroom »

Ah okay, that's not a big problem then. Thanks Tony!
User avatar
Tony Li
Posts: 23143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Visual Novel template - Continue button available even when no saves in slot

Post by Tony Li »

Glad to help!
Post Reply