Textline Resume Scene without Dialogue Canvas Appearing

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dmangames
Posts: 20
Joined: Fri Jul 13, 2018 9:55 pm

Textline Resume Scene without Dialogue Canvas Appearing

Post by Dmangames »

Hi,

I am using a central hub for my game that branches off into many other scenes and the dialogue canvas only appears in a couple of scenes. Currently, whenever I close and load the game, the dialogue will always be present in the scene; even if that scene doesn't normally have dialogue in it.

Is it possible to have the dialogue manager resume the game either always at the central hub or have the dialogue UI not always be present on resume?

Thanks!
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Tony Li »

Hi,

Try the latest Textline and Menu Framework packages on the Extras page. Please back up your project first!

Your Menu System GameObject (in scene "0 Start") may have an Auto Save Load component. Make sure its Load On Start checkbox is unticked. This way it will always start in 0 Start and not auto-load into wherever the player was when they closed the game.

Or inspect the Save System component on the Menu System GameObject, and untick Save Current Scene. When this is unticked, the save system won't record the scene that the game was saved in, and so it won't switch to that scene when the game (auto-)loads.
Dmangames
Posts: 20
Joined: Fri Jul 13, 2018 9:55 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Dmangames »

Hi Tony,

Thanks for the suggestions. I have updated to the latest Textline and Menu Framework packages.
Your Menu System GameObject (in scene "0 Start") may have an Auto Save Load component. Make sure its Load On Start checkbox is unticked. This way it will always start in 0 Start and not auto-load into wherever the player was when they closed the game.
I have Load on Start unticked so I always start on Start 0, but when I hit continue the correct scene loads as long as you were not part of a conversation when you quit, If you were in a conversation, then switched the scene midway, the game will always load scene 3 (conversation scene) even if you were on a completely different scene when you quit.

What I would like to happen is when you hit continue, it will only take you to the conversation if you actually exited the game on scene 3, otherwise it will go to whatever scene you were on last.
Dmangames
Posts: 20
Joined: Fri Jul 13, 2018 9:55 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Dmangames »

Actually after testing it a little more, it seems if I switch scenes many times after the conversation scene (scene 3), then it loads the correct scene.

Example 1: scene 3 -> scene 4 -> scene 5 -> scene 4 -> scene 5 -> quit
This loads scene 5

Example 2: scene 3 -> scene 4 -> quit
This loads scene 3

Example 3: scene 3 -> scene 4 -> scene 5 -> quit
This loads scene 3

Example 4: scene 3 -> scene 4 -> scene 5 -> scene 4 -> quit
This loads scene 5

In fact, scene 4 (hub scene) never is the one loaded from continue. Maybe it's because I have it set as the First Gameplay Scene in Save Helper?
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Tony Li »

Hi,

That may be a bug. Please back up your project and then import this patch:

SaveSystemPatch_2018-08-01.unitypackage

It resolves a conflict in the way the Menu Framework (e.g., Save Helper component) and Auto Save Load component work together. (Auto Save Load was saving the game, but it wasn't recording the slot number that it saved to. Save Helper needs to know the slot number to know which saved game to continue.)

If that doesn't fix the issue, here are some things to check:

- On the Menu System GameObject's Auto Save Load component, make sure the Don't Save In Scenes list is empty.

- On the Menu System GameObject, tick the Debug checkboxes on the Save System and Player Prefs Saved Game Data Storer components. This will log when the save system saves and loads games, as well as the saved game data. Look for a line like this:

Code: Select all

Save System: Storing in PlayerPrefs key Save0: {"m_sceneName":"3 Gameplay",...
The "m_sceneName":"3 Gameplay" in the line above means that the game was saved in the scene "3 Gameplay".

BTW, the Save Helper's First Gameplay Scene is only used when restarting a new game, not when continuing a game.
Dmangames
Posts: 20
Joined: Fri Jul 13, 2018 9:55 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Dmangames »

Wow, thanks for the amazing support!
That fixed it.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Textline Resume Scene without Dialogue Canvas Appearing

Post by Tony Li »

Thanks for letting me know. Sorry about the bug. I'm glad it was an easy fix.
Post Reply