# ClearLabels(Object)

> Removes all labels attached to an asset.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static void ClearLabels(Object obj)
```

### Parameters

**** (\[Object]\(/engine/6000.3/script-reference/unityengine/object)): The asset object to remove labels from.

### Remarks

The following example removes all labels from the assets selected in the **Project** window:

### Examples

```csharp
using UnityEditor;
using UnityEngine;

static class AssetLabelCleanup
{
    [MenuItem("Tools/Clear Labels On Selected Assets")]
    static void ClearLabelsOnSelection()
    {
        foreach (string guid in Selection.assetGUIDs)
        {
            string path = AssetDatabase.GUIDToAssetPath(guid);
            Object asset = AssetDatabase.LoadMainAssetAtPath(path);
            AssetDatabase.ClearLabels(asset);
        }
    }
}
```
