19
Advanced Topics – Gizmos, Automated Testing, and More
This chapter will cover three sets of advanced recipes:
- Gizmos
- Automated testing
- An introduction to Unity Python
Gizmos facilitate Unity Editor customization. Gizmos are visual aids for game designers that are provided in the Scene panel. They can be useful as setup aids (to help us know what we are doing) or for debugging (understanding why objects aren’t behaving as expected).
Gizmos are not drawn through Editor Scripts, but as part of the MonoBehaviour
class, so they only work for GameObjects in the current scene. Gizmo drawing is usually performed with two methods:
OnDrawGizmos()
: This is executed at every frame or Editor window repaint, for every GameObject in the Hierarchy panel. ...
Get Unity Cookbook - Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.