1

I'm building a game and I need to store multiple data about levels:

  • A list of strings for dialogs
  • An int for the countdown time of each level
  • A float for right answer
  • Strings for dynamically loaded asset names.
  • probably some other data..

Coming from a web background, the most obvious path is to make this with JSON, but Unity 3D does not provide JSON support out of the box.. so I thought of XML, but still, no native support.. then I thought about multidimentional array, but there are limitations, such as the data types must be the same.

As a student, I want to do things according to the development pattern of the engine without external libraries, and my question is How do Unity Game Developers store data like this? What is the best way to deal with this problem?

sigmaxf
  • 7,998
  • 15
  • 65
  • 125
  • Unity can't reference Newtonsoft.Json? – BradleyDotNET Mar 07 '17 at 20:02
  • If you really can't use JSON, why can't you reference `System.Xml` and just using XML? I'm not sure what you mean by "no native support". – Serlite Mar 07 '17 at 20:11
  • 2
    Unity **DOES** support JSON there is a lot of answer here on SO: http://stackoverflow.com/questions/36239705/serialize-and-deserialize-json-and-json-array-in-unity/36244111#36244111 – Ludovic Feltz Mar 07 '17 at 20:14

0 Answers0