Version: 2023.2

Gizmos

class in UnityEngine

切换到手册

描述

辅助图标用于协助在 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.

静态变量

colorSets the Color of the gizmos that are drawn next.
exposure设置包含 LightProbe 辅助图标的曝光校正的纹理。值从纹理中间的红色通道进行采样。
matrix设置 Unity Editor 用于绘制 Gizmos 的 Matrix4x4。
probeSizeSet a scale for Light Probe gizmos. This scale will be used to render the spherical harmonic preview spheres.

静态函数

CalculateLODDetermines the appropriate level of detail for a gizmo in the Scene view at a specified position with a specified radius.
DrawCubeDraw a solid box at center with size.
DrawFrustumDraw a camera frustum using the currently set Gizmos.matrix for its location and rotation.
DrawGUITexture在该场景中绘制一个纹理。
DrawIcon在 Scene 视图中的某个位置绘制一个图标。
DrawLine绘制一条从 from 开始到 to 的线。
DrawLineListDraws multiple lines between pairs of points.
DrawLineStripDraws a line between each point in the supplied span.
DrawMesh绘制一个网格。
DrawRay绘制一条从 from 开始到 from + direction 的射线。
DrawSphere使用 center 和 radius 绘制一个实心球体。
DrawWireCube使用 center 和 size 绘制一个线框盒体。
DrawWireMesh绘制一个线框网格。
DrawWireSphere使用 center 和 radius 绘制一个线框球体。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961