The two preprocessor directives #region
and #endregion
(in combination with the code folding feature) can be highly useful for improving the readability of your code and also for improving the speed with which you can navigate the source file. They add organization and structure to your source code without affecting its validity or execution. Effectively, #region
marks the top of a code block and #endregion
marks the end. Once a region is marked, it becomes foldable, that is, it becomes collapsible using the MonoDevelop
code editor, provided the code folding feature is enabled. Collapsing a region of code is useful for hiding it from view, which allows you to concentrate on reading other areas relevant to your needs, as shown in the following screenshot:
Mastering Unity Scripting
By :
Mastering Unity Scripting
By:
Overview of this book
Table of Contents (17 chapters)
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Unity C# Refresher
Debugging
Singletons, Statics, GameObjects, and the World
Event-driven Programming
Cameras, Rendering, and Scenes
Working with Mono
Artificial Intelligence
Customizing the Unity Editor
Working with Textures, Models, and 2D
Source Control and Other Tips
Index
Customer Reviews