Gizmos

class in UnityEngine

Switch to Manual

Description

Gizmos are used to give visual debugging or setup aids in the Scene view.

All gizmo drawing has to be done in either OnDrawGizmos or OnDrawGizmosSelected functions of the script.
OnDrawGizmos is called every frame. All gizmos rendered within OnDrawGizmos are pickable. OnDrawGizmosSelected is called only if the object the script is attached to is selected.

Static Variables

color为接下来绘制的辅助图标设置颜色。
matrix设置用于绘制所有辅助图标的辅助图标矩阵。

Static Functions

DrawCube使用 center 和 size 绘制一个实心盒体。
DrawFrustum绘制一个摄像机视锥体,并且将当前设置的 Gizmos.matrix 用于其位置和旋转。
DrawGUITextureDraw a texture in the Scene.
DrawIconDraw an icon at a position in the Scene view.
DrawLine绘制一条从 from 开始到 to 的线。
DrawMesh绘制一个网格。
DrawRay绘制一条从 from 开始到 from + direction 的射线。
DrawSphere使用 center 和 radius 绘制一个实心球体。
DrawWireCube使用 center 和 size 绘制一个线框盒体。
DrawWireMesh绘制一个线框网格。
DrawWireSphere使用 center 和 radius 绘制一个线框球体。