Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

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-ins. This section covers the latest, native JSON tools provided with Unity. However, if you want or need to use an earlier release, then take a look at the following, free third-party add-on offering JSON support, available here: http://wiki.unity3d.com/index.php/SimpleJSON.

JSON parser

To get started using JSON in Unity, create a new project and add the...