辅助图标用于协助在 Scene 视图中进行视觉调试或设置。
All gizmo drawing has to be done in either MonoBehaviour.OnDrawGizmos or MonoBehaviour.OnDrawGizmosSelected functions of the script. MonoBehaviour.OnDrawGizmos is called when the Scene view or Game view is repainted. All gizmos that render in MonoBehaviour.OnDrawGizmos are pickable. MonoBehaviour.OnDrawGizmosSelected is called only if the object the script is attached to is selected.
color | Sets the Color of the gizmos that are drawn next. |
exposure | 设置包含 LightProbe 辅助图标的曝光校正的纹理。值从纹理中间的红色通道进行采样。 |
matrix | 设置 Unity Editor 用于绘制 Gizmos 的 Matrix4x4。 |
probeSize | Set a scale for Light Probe gizmos. This scale will be used to render the spherical harmonic preview spheres. |
CalculateLOD | Determines the appropriate level of detail for a gizmo in the Scene view at a specified position with a specified radius. |
DrawCube | Draw a solid box at center with size. |
DrawFrustum | Draw a camera frustum using the currently set Gizmos.matrix for its location and rotation. |
DrawGUITexture | 在该场景中绘制一个纹理。 |
DrawIcon | 在 Scene 视图中的某个位置绘制一个图标。 |
DrawLine | 绘制一条从 from 开始到 to 的线。 |
DrawLineList | Draws multiple lines between pairs of points. |
DrawLineStrip | Draws a line between each point in the supplied span. |
DrawMesh | 绘制一个网格。 |
DrawRay | 绘制一条从 from 开始到 from + direction 的射线。 |
DrawSphere | 使用 center 和 radius 绘制一个实心球体。 |
DrawWireCube | 使用 center 和 size 绘制一个线框盒体。 |
DrawWireMesh | 绘制一个线框网格。 |
DrawWireSphere | 使用 center 和 radius 绘制一个线框球体。 |