#Save & Load System

1 messages · Page 1 of 1 (latest)

carmine forum
#

This will vary platform to platform, but the standard C# way would be to use Directory.EnumerateFiles which will give you a list of all file names in that target directory.

Are the decorations coming from the app (assets that ship with the build) or are they user generated (images loaded from their device)?

gloomy junco
#

The decorations are coming from both. They're assets which you instantiate but also pictures that the user can take from their phone gallery.

#

I will try using "Directory.EnumerateFiles"

gloomy junco
#

I managed to make EnumerateFiles work. I compared the files inside and managed to get the latest file to load and then add the rest in the correct order of newest to oldest.
I still don't know how I would go around loading and unloading the save files when you go from one page to another though.

This all happens in the same scene and I instantiate the saved decorations into a parent object, so I don't know if it would be something as simple as deleting everything in there before I load the page you're going to or if there's a better way to do it without straining the device since you should be able to swap pages quickly.