Saving data - JSON files

Saving data to XML is an important and powerful ability. XML is such a common data-interchange format that almost all data-driven applications must support it, both for loading and saving data. Nevertheless, XML files are often large, syntactically verbose, and inappropriate for saving small nuggets of data. XML files can be needlessly large in file size, and can be time-consuming to process. As a result, JSON has emerged as a lighter alternative, and it is commonly adopted in games. Since the release of Unity 5.3, JSON is a natively-supported format. Prior to this release, developers needed to use third-party add-ons. This section covers the latest, native JSON tools provided with Unity. However, if you want or need ...

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.