Les gizmos sont utilisés pour fournir des aides au débogage visuel ou à la configuration dans la vue de la scène.
Tous les dessins de gizmo doivent être effectués dans les fonctions OnDrawGizmos ou OnDrawGizmosSelected du script.
OnDrawGizmos est appelé chaque image.
Tous les gadgets rendus dans OnDrawGizmos sont sélectionnables. OnDrawGizmosSelected est appelé uniquement si l’objet auquel le script est attaché est sélectionné.
Static Properties
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. |
Static Methods
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. |