Gizmos.DrawIcon Manual     Reference     Scripting  
Scripting > Runtime Classes > Gizmos

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


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 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");