Gizmos.DrawIcon Manual     Reference     Scripting  
Scripting > Runtime Classes > Gizmos
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");
}