Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Gizmos   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Gizmos
  • All Members
  • Class Variables
  • color
  • matrix
  • Class Functions
  • DrawCube
  • DrawGUITexture
  • DrawIcon
  • DrawLine
  • DrawRay
  • DrawSphere
  • DrawWireCube
  • DrawWireSphere

Gizmos.DrawIcon  

static function DrawIcon (center : Vector3, name : string) : void

Description

Draw an icon at world position center.

The icon has to be named name and be found in the Assets/Gizmos folder or in the Unity.app/Contents/Resources folder. DrawIcon can be used to allow quick picking of important objects in your game.

// Draws the Light bulb icon at position of the object.
// Because we draw it inside OnDrawGizmos the icon is also pickable
// in the scene view.
function OnDrawGizmos () {
Gizmos.DrawIcon (transform.position, "Light Gizmo.tiff");
}