How to save my serialized levels ?

I am making a 3D Puzzle game which has many levels pre-loaded and some made by users using a level editor. I am using the serializer from to serialize the level. I am using “LevelSerializer.SerializeNow()” and not “LevelSerializer.SaveGame()” so that I can send the user made levels’ data to be stored also on a server.

But I don’t understand how to save the string I got from serializing on the users machine.

Some possible ways I am thinking about…

  1. PlayerPrefs.
  2. Saving each levels’ serialized string in each line of a single file.
  3. Saving each levels’ serialized string in each file.
  4. XML file.
  5. Database like SQLite.

Please tell me a best way to do it.

(The game is for android and Ios)

You mean SerializeLevel, right?

I’d go with either PlayerPrefs or use multiple files. It really depends on what you are trying to achieve. Multiple files has the benefit of moving the smallest amount of data. Those strings can get pretty long for a database, but I’m pretty sure SQLite could handle it - that makes sense if there are going to be lots.