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

Summary


This chapter explored in depth the relationship between reflection, as a concept, and its practical use for creating Editor classes that extended the editor behavior beyond its defaults to accommodate custom intentions. The ability to do this is not always essential to building Unity games themselves but it can make your work easier. Furthermore, it can lead to making money via the Asset Store, should you wish to develop custom add-ons that can help other developers. Here, you saw how to create a Batch Rename tool with the ScriptableWizard class and then a color blending property for the Object Inspector. Next, we made extensive use of reflection to expose all public C# properties in the Object Inspector that allowed us direct access to the set and get property values as if we'd accessed them at runtime. Further, we moved on to see how a localization framework could be implemented from XML files via the Editor classes that allow string variables to be automatically changed to match...