coverpage
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Unity C# Refresher
Why C#?
Creating script files
Instantiating scripts
Variables
Conditional statements
Arrays
Loops
Functions
Events
Classes and object-oriented programming
Classes and inheritance
Classes and polymorphism
C# properties
Commenting
Variable visibility
The ? operator
SendMessage and BroadcastMessage
Summary
Chapter 2. Debugging
Compilation errors and the console
Debugging with Debug.Log – custom messages
Overriding the ToString method
Visual debugging
Error logging
Editor debugging
Using the profiler
Debugging with MonoDevelop – getting started
Debugging with MonoDevelop – the Watch window
Debugging with MonoDevelop – continue and stepping
Debugging with MonoDevelop – call stack
Debugging with MonoDevelop – the Immediate window
Debugging with MonoDevelop – conditional breakpoints
Debugging with MonoDevelop – tracepoints
Summary
Chapter 3. Singletons Statics GameObjects and the World
The GameObject
Component interactions
GameObjects and the world
The world time and updates
Immortal objects
Understanding singleton objects and statics
Summary
Chapter 4. Event-driven Programming
Events
Event management
Code folding in MonoDevelop with #region and #endregion
Summary
Chapter 5. Cameras Rendering and Scenes
Camera gizmos
Being seen
Orthographic cameras
Camera rendering and postprocessing
Camera shake
Cameras and animation
Cameras and curves
Summary
Chapter 6. Working with Mono
Lists and collections
IEnumerable and IEnumerator
Strings and regular expressions
Infinite arguments
Language Integrated Query
Linq and regular expressions
Working with Text Data Assets
Text Assets – loading from the local files
Summary
Chapter 7. Artificial Intelligence
Artificial Intelligence in games
Starting the project
Baking a navigation mesh
Starting an NPC agent
Finite State Machines in Mecanim
Finite State Machines in C# – getting started
Creating the Idle state
Creating the Patrol state
Creating the Chase state
Creating the Attack state
Creating the Seek-Health (or flee) state
Summary
Chapter 8. Customizing the Unity Editor
Batch renaming
C# attributes and reflection
Color blending
Property exposing
Localization
Summary
Chapter 9. Working with Textures Models and 2D
Skybox
Procedural meshes
Animating UVs – scrolling textures
Texture painting
Summary
Chapter 10. Source Control and Other Tips
Git – source control
Resources folder and external files
AssetBundles and external files
Persistent data and saved games
Summary
Index
更新时间:2021-08-06 19:18:31