Saving Playerdata using the save system

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Defunctmp3
Posts: 1
Joined: Mon Jan 03, 2022 2:43 pm

Saving Playerdata using the save system

Post by Defunctmp3 »

Hi,

I was wondering if anyone knows how to save non dialogue system objects and scripts using the save system in dialogue manager and how to load it on start?
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Saving Playerdata using the save system

Post by Tony Li »

Hi,

If you want to save non-Dialogue System data in a saved game, you can use the Dialogue System's save system. Create a Saver script and add it to the scene. To start, duplicate the SaverTemplate.cs script. Then fill in your code where the comments indicate. Examine some of the existing Saver scripts, such as PositionSaver and EnabledSaver, to see examples.

If you want to save other data such as audio volume preferences that aren't specific to a saved game, don't use the save system. Instead, use PlayerPrefs or something like that.
Post Reply