更新时间:2021-06-24 12:13:56
coverpage
Title Page
Copyright and Credits
Unity Game OptimizationThird Edition
Dedication
About Packt
Why subscribe?
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Base Scripting Optimization
Evaluating Performance Problems
Gathering profiling data using the Unity Profiler
Launching the Profiler
Editor or standalone instances
Connecting to a WebGL instance
Remote connection to an iOS device
Remote connection to an Android device
Editor profiling
The Profiler window
Profiler controls
Add Profiler
Playmode
Record
Deep Profile
Allocation Callstack
Clear
Load
Save
Frame Selection
Timeline View
Breakdown View Controls
Breakdown View
The CPU Usage area
The GPU Usage area
The Rendering area
The Memory area
The Audio area
The Physics 3D and Physics 2D areas
The network messages and network operations areas
The Video area
The UI and UI Details areas
The Global Illumination area
Best approaches to performance analysis
Verifying script presence
Verifying script count
Verifying the order of events
Minimizing ongoing code changes
Minimizing internal distractions
Minimizing external distractions
Targeted profiling of code segments
Profiler script control
Custom CPU profiling
Final thoughts on profiling and analysis
Understanding the Profiler
Reducing noise
Focusing on the issue
Summary
Scripting Strategies
Obtaining components using the fastest method
Removing empty callback definitions
Caching component references
Sharing calculation output
Update coroutines and InvokeRepeating
Faster GameObject null reference checks
Avoid retrieving string properties from GameObjects
Using appropriate data structures
Avoiding re-parenting transforms at runtime
Considering caching transform changes
Avoiding Find() and SendMessage() at runtime
Assigning references to pre-existing objects
Static classes
Singleton components
A global messaging system
A globally accessible object
Registration
Message processing
Implementing the messaging system
Message queuing and processing
Implementing custom messages
Message sending
Message registration
Message cleanup
Wrapping up the messaging system
Disabling unused scripts and objects
Disabling objects by visibility
Disabling objects by distance
Using distance-squared over distance
Minimizing deserialization behavior
Reducing serialized object size