# GetAllAssetBundleNames()

> Obtain all the AssetBundle names registered in the Asset Database.

## Definition

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

```csharp
public static string[] GetAllAssetBundleNames()
```

### Returns

| Type                                                               | Description                            |
| ------------------------------------------------------------------ | -------------------------------------- |
| [string\[\]](https://learn.microsoft.com/dotnet/api/system.string) | Returns an array of AssetBundle names. |

### Examples

```csharp
using UnityEditor;
using UnityEngine;

public class GetAssetBundleNames
{
    [MenuItem("Assets/Get Asset Bundle names")]
    static void GetNames()
    {
        var names = AssetDatabase.GetAllAssetBundleNames();
        foreach (string name in names)
            Debug.Log("Asset Bundle: " + name);
    }
}
```
