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.
color | Sets the color for the gizmos that will be drawn next. |
exposure | Set a texture that contains the exposure correction for LightProbe gizmos. The value is sampled from the red channel in the middle of the texture. |
matrix | Sets the Matrix4x4 that the Unity Editor uses to draw Gizmos. |
DrawCube | Draw a solid box with center and size. |
DrawFrustum | Draw a camera frustum using the currently set Gizmos.matrix for it's location and rotation. |
DrawGUITexture | Draw a texture in the Scene. |
DrawIcon | Draw an icon at a position in the Scene view. |
DrawLine | Draws a line starting at from towards to. |
DrawMesh | Draws a mesh. |
DrawRay | Draws a ray starting at from to from + direction. |
DrawSphere | Draws a solid sphere with center and radius. |
DrawWireCube | Draw a wireframe box with center and size. |
DrawWireMesh | Draws a wireframe mesh. |
DrawWireSphere | Draws a wireframe sphere with center and radius. |
Did you find this page useful? Please give it a rating: