Book Image

Mastering Unity Scripting

By : Alan Thorn
Book Image

Mastering Unity Scripting

By: Alan Thorn

Overview of this book

Table of Contents (17 chapters)
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Resources folder and external files


Your games will frequently rely on external data loaded from files such as XML files, perhaps, for subtitles, localization, or level serialization. Have a look at the following screenshot:

Printing a message loaded from an external text file asset that will compile with the project

In these cases, you want a specific range of abilities. The first one is the ability to dynamically load data from the file into memory in a way that Unity can parse and understand. The second is the ability to change and edit the file contents, even after importing it into Unity, and then have the effects of the changes update in the game without requiring code changes. The third is the ability to compile and distribute your standalone game with the file included as part of the main Unity build, rather than as a separate and editable file alongside the main executable. To elaborate further on the third point, you don’t usually want to distribute your game as a standalone build...