VNload level disables remember current dialogue entry when changing scenes

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Boydy111
Posts: 13
Joined: Sun Jul 28, 2024 12:20 am

VNload level disables remember current dialogue entry when changing scenes

Post by Boydy111 »

Hi

Im currently using the VNframework, and im running into an issue.

When the player saves after a scene change, then loads said save it will just restart the dialogue trigger rather than save on the current node.

I've tried a couple of work arounds already but they just don't seem to help

I'm using the 2.2.47 version of dialogue system and the 2021.3.30f1.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Tony Li »

Hi,

Make sure your Dialogue Manager GameObject has a "Remember Current Dialogue Entry" or "Conversation State Saver" script (either is fine).

Your Dialogue System Trigger component in your gameplay scene should be set to OnSaveDataApplied, not OnStart. See the Test Conversation GameObject in the Example Gameplay scene for an example.
Boydy111
Posts: 13
Joined: Sun Jul 28, 2024 12:20 am

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Boydy111 »

Tony Li wrote: Sat Aug 17, 2024 10:06 pm Hi,

Make sure your Dialogue Manager GameObject has a "Remember Current Dialogue Entry" or "Conversation State Saver" script (either is fine).

Your Dialogue System Trigger component in your gameplay scene should be set to OnSaveDataApplied, not OnStart. See the Test Conversation GameObject in the Example Gameplay scene for an example.
Thanks for getting back to me!

This seems to have fixed it in editor when I'm using the Conversation state saver but when i build the game it ceases to work, if i save the game during a conversation I'm currently in, then immediately load that save it begins from the start of the conversation rather than the point i was at.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Tony Li »

Hi,

Check the configuration of the Dialogue Manager in the start scene (the first scene in build settings). At runtime, this instance of the Dialogue Manager will survive scene changes and supplant Dialogue Managers in subsequently-loaded scenes.
Boydy111
Posts: 13
Joined: Sun Jul 28, 2024 12:20 am

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Boydy111 »

Hi

Heres my current dialogue manager set up in the first scene in build settings (Start), it should already replace itself if theres another version of it it within a scene
Issue_1.PNG
Issue_1.PNG (40.88 KiB) Viewed 1018 times
I also made a dev build to see if any errors came up in there, i got this error here ( * are just private info)

NullReferenceException: Object reference not set to an instance of an object
at PixelCrushers.DialogueSystem.ConversationStateSaver+<StartSavedConversation>d__6.MoveNext () [0x0037a] in C:\Users\*****\Documents\*****\*****\Assets\Plugins\Pixel Crushers\Dialogue System\Scripts\Save System\ConversationStateSaver.cs:137
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <aa8a130777a0452aba2a2ed77148f1da>:0
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Tony Li »

Hi,

Please let me know if this patch resolves the issue:

DS_ConversationStateSaverPatch_2024-08-18.unitypackage
Boydy111
Posts: 13
Joined: Sun Jul 28, 2024 12:20 am

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Boydy111 »

Hi again

This has resolved the error but i still have the issue of not being able to load a save while in the scene that said save was from, it will function correctly if i were to go to the menu (Start scene) and then load the save

What happens currently is when i load the scene, it will play the Onsavedataapplied dialogue system trigger and after a few moments the Dialogue box will become blank and any actor portraits will also be blank, this currently only happens in the build version rather than the editor
Issue_2.PNG
Issue_2.PNG (172.46 KiB) Viewed 990 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Tony Li »

Hi,

Would you please make another dev build and check it for errors or warnings when you reproduce the issue?

Usually when something Dialogue System-related works in the Unity editor's play mode but not in a build, it's an issue with persistent singleton GameObjects like the Dialogue Manager or Visual Novel Menu Canvas.

Also, feel free to send a reproduction project to tony (at) pixelcrushers.com
Boydy111
Posts: 13
Joined: Sun Jul 28, 2024 12:20 am

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Boydy111 »

Ill send you over a reproduction project as soon as i can.

thanks again for all your help, this is why this asset is incredible!

cheers.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: VNload level disables remember current dialogue entry when changing scenes

Post by Tony Li »

Thanks for sending the repro project. To wrap this up for the thread history: It was an issue in the ConversationStateSaver component. I sent you a patch. The fix will also be in v2.2.48.
Post Reply