Hello Tony,
Thank you for the awesome Dialogue System for Unity!
I have a question regarding the save system.
In my project, I'm converting images into JSON format and saving them using a Saver in Dialogue System for Unity. Since saving images is causing performance hiccups, I plan to make the Saver ignore the part responsible for saving images, and only allow the Photo Saver to execute RecordData when necessary.
I tried adding a variable as a gate in the Photo Saver's RecordData, or adding logic to skip the Photo Saver, but I noticed that the previously saved data gets overwritten and becomes empty. I suspect that when the Saver executes the save operation, it clears all the data before calling every Saver's RecordData. If that's the case, is there a way to achieve what I need?
Thanks for your help!
Make the Saver ignore saving
Re: Make the Saver ignore saving
Hi,
What if you just return the existing save data in this case? For example:
What if you just return the existing save data in this case? For example:
Code: Select all
public override string RecordData()
{
if (convertToJson)
{
return ConvertImageToJson();
}
else
{
return SaveSystem.currentSavedGameData.GetData(key);
}
}
Re: Make the Saver ignore saving
Thank you for your reply. In the end, I chose to use the File API to save the images separately to the hard disk. I hadn't considered that your method could achieve the goal so effectively and simply. I will give it a try later. Thank you again for your help!