Book Image

Unity 4.x Cookbook

By : Matt Smith, Chico Queiroz
Book Image

Unity 4.x Cookbook

By: Matt Smith, Chico Queiroz

Overview of this book

<p>Covering the latest version (Unity 4) of this established game engine, the Unity 4.x Cookbook explores a wide range of 3D, animation, multimedia, and scripting game features.<br /><br />The power of Unity 4 is demonstrated through the 10 chapters covering many of this game engine’s features.<br /><br />"Unity 4.x Cookbook" helps you learn how to make the most of the powerful but easy-to-use Unity 4 game engine. <br /><br />Every Unity game developer is different. Some come from a multimedia background, some are new to game development, and some are transferring from other engines. Whatever your background, with the breadth and depth of topics covered you should find new features and techniques to enhance your next game.<br /><br />This book offers detailed, easy-to-follow, step-by-step recipes helping you master a wide range of Unity game features. <br /><br />Chapters are provided focusing on the basics; audio, cameras, images, materials and animations, GUIs, external resources and devices, directional and artificial intelligence character control, and performance optimization.<br /><br />"Unity 4.x Cookbook" provides a collection of ideas and resources that should offer new and useful techniques for every Unity game developer to enhance their next game.</p>
Table of Contents (18 chapters)
Unity 4.x Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Working with External Text Files and XML Data

In this chapter, we will cover:

  • Loading external text files using the TextAsset public variable

  • Loading external text files using C# file streams

  • Saving external text files with C# file streams

  • Loading and parsing external XML files

  • Creating XML text data manually using XMLWriter

  • Creating XML text data automatically through serialization

  • Creating XML text files – saving XML directly to text files with XMLDocument.Save()