Page 1 of 1
Save Data error
Posted: Tue Nov 06, 2018 4:52 am
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.
Re: Save Data error
Posted: Tue Nov 06, 2018 8:22 am
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.)
Re: Save Data error
Posted: Tue Nov 06, 2018 9:02 am
by Kole90
Yeah I'm using 2.0.1, will update it and let you know how it went.
Re: Save Data error
Posted: Tue Nov 06, 2018 9:16 am
by Kole90
Yeah the problem is still there but the errors are on different code lines, it may help you figure it out.
Re: Save Data error
Posted: Tue Nov 06, 2018 10:07 am
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?
Re: Save Data error
Posted: Wed Nov 07, 2018 3:53 am
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
Re: Save Data error
Posted: Wed Nov 07, 2018 7:38 am
by Tony Li
No worries; I'm glad it's working now.