Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AssetDatabase.GetAllAssetBundleNames

public static string[] GetAllAssetBundleNames();

Returns

string[] Array of asset bundle names.

Description

Return all the AssetBundle names in the asset database.

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

Did you find this page useful? Please give it a rating: