# DrawIcon

> Draw an icon at a position in the Scene view.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## DrawIcon(Vector3, string, bool)

Draw an icon at a position in the Scene view.

```csharp
public static void DrawIcon(Vector3 center, string name, bool allowScaling)
```

### Parameters

**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The location of the icon in world space.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The file name of the image relative to the **Assets/Gizmos** folder.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the icon is permitted to be scaled.

### Remarks

Place the image file in the **Assets/Gizmos** folder.

DrawIcon can be used to allow important objects in your game to be selected quickly.

### Examples

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void OnDrawGizmos()
    {
        // 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.

        Gizmos.DrawIcon(transform.position, "Light Gizmo.tiff", true, Color.red);
    }
}
```

## DrawIcon(Vector3, string, bool, Color)

Draw an icon at a position in the Scene view.

```csharp
public static void DrawIcon(Vector3 center, string name, bool allowScaling, Color tint)
```

### Parameters

**** (\[Vector3]\(/engine/6000.0/script-reference/unityengine/vector3)): The location of the icon in world space.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The file name of the image relative to the **Assets/Gizmos** folder.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the icon is permitted to be scaled.**** (\[Color]\(/engine/6000.0/script-reference/unityengine/color)): A tint applied to the icon. (Optional).

### Remarks

Place the image file in the **Assets/Gizmos** folder.

DrawIcon can be used to allow important objects in your game to be selected quickly.

### Examples

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void OnDrawGizmos()
    {
        // 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.

        Gizmos.DrawIcon(transform.position, "Light Gizmo.tiff", true, Color.red);
    }
}
```
