O'Reilly logo

Mastering Unity 2017 Game Development with C# - Second Edition by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comments

  • For Serialization to work, you'll need to import the System.IO and System.Xml.Serialization namespaces. The former library contains classes and functions for saving data to files on the local computer, and the latter for converting data in the memory to an XML string.
  • The TransformationDataXML class is declared using the [System.Serializable] attribute. This means that the class contains properties that can be transformed to text for Serialization, and it can also show its values in the object Inspector, if declared as a public object.
  • The TransformationDataXML class contains all the data needed to save a transform component to a string. The variables Vector3 (for position and scale) and a Quaternion (for rotation) do not, by default, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required