用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:gizmos:gizmos

Gizmos 可视化辅助工具

class in UnityEngine

Description 描述

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

Gizmos是用于在场景视图可视化调试或辅助设置。

All gizmo drawing has to be done in either OnDrawGizmos or OnDrawGizmosSelected functions of the script.

所有gizmo绘制需要在脚本的OnDrawGizmos或OnDrawGizmosSelected里函数完成。

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.

OnDrawGizmos在每帧调用。所有在OnDrawGizmos中渲染的gizmos都是可见的。OnDrawGizmosSelected仅在脚本附加的物体被选择时被调用。

Static Variables 静态变量

colorSets the color for the gizmos that will be drawn next.
为随后绘制的gizmos设置颜色。
matrixSet the gizmo matrix used to draw all gizmos.
设置gizmo的矩阵用于绘制所有gizmos。

Static Functions 静态函数

DrawCubeDraw a solid box with center and size.
使用center和size参数,绘制一个实心立方体。
DrawFrustumDraw a camera frustum using the currently set Gizmos.matrix for it's location and rotation.
绘制相机可视区域,用当前的Gizmos.matrix设置它的位置和旋转。
DrawGUITextureDraw a texture in the scene.
在屏幕上绘制纹理。
DrawIconDraw an icon at a position in the scene view.
在场景视图世界位置绘制一个图标。
DrawLineDraws a line starting at from towards to.
绘制一条从from起点到to位置的线段。
DrawMeshDraws a mesh.
绘制一个网格。
DrawRayDraws a ray starting at from to from + direction.
绘制从起点沿正方向延伸的射线。
DrawSphereDraws a solid sphere with center and radius.
使用center和radius参数,绘制一个实心球体。
DrawWireCubeDraw a wireframe box with center and size.
使用center和size参数,绘制一个线框立方体。
DrawWireMeshDraws a wireframe mesh.
绘制一个线框网格。
DrawWireSphereDraws a wireframe sphere with center and radius.
根据center和radius参数设置线框球体。
script/unityengine/classes/gizmos/gizmos.txt · 最后更改: 2016/08/02 05:28 (外部编辑)