Save Data error

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Save Data error

Post by Kole90 »

Hey Tony. I have a problem regarding loading Dialogue System Data. When I'm trying to load the data after the scene loads I'm getting an NullReferenceException error on the line where I'm calling PersistentDataManager.GetSaveData(); can you elaborate what is going wrong here? I'm attaching a screen shot of error message.
Attachments
Capture.PNG
Capture.PNG (17.46 KiB) Viewed 770 times
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save Data error

Post by Tony Li »

Hi,

What version of the Dialogue System are you using? Can you update to version 2.0.5 and let me know if the problem still exists? (When updating anything or importing any package, it's always a good idea to make a backup first, just to be safe.)
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Save Data error

Post by Kole90 »

Yeah I'm using 2.0.1, will update it and let you know how it went.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Save Data error

Post by Kole90 »

Yeah the problem is still there but the errors are on different code lines, it may help you figure it out.
Attachments
Capture.PNG
Capture.PNG (17.4 KiB) Viewed 763 times
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save Data error

Post by Tony Li »

Is there a Dialogue Manager in the scene?

How are your Dialogue Manager GameObjects set up? Are the Allow Only One Instance and Don't Destroy On Load checkboxes ticked?
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Save Data error

Post by Kole90 »

Yeah you were right Tony that one particular scene was missing the Dialogue Manager... It's set on both Allow Only One Instance and Don't Destroy On Load, but at the moment there is no dialogues at that scene so I forgot to put Dialogue Manager in it. Normally when you play the game and reach that scene Dialogue Manager will be present in that scene because it gets transferred there, but in this particular case I was loading the game directly on that scene and there was no Dialogue Manager in it by default, such a weird mistake on my end, thanks for helping me figure it out :)
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save Data error

Post by Tony Li »

No worries; I'm glad it's working now.
Post Reply