Page 1 of 1

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

Posted: Wed Jan 29, 2025 2:30 pm
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.

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

Posted: Wed Jan 29, 2025 4:41 pm
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.

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

Posted: Wed Jan 29, 2025 4:44 pm
by lostmushroom
Ah okay, that's not a big problem then. Thanks Tony!

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

Posted: Wed Jan 29, 2025 7:20 pm
by Tony Li
Glad to help!