AssetDatabase.GetAllAssetBundleNames

Unity · Версия 2020.3 LTS · Scripting · AssetDatabase

AssetDatabase.GetAllAssetBundleNames

Объявление

public static string[] GetAllAssetBundleNames();

Возвращает

string[] Массив имен пакетов ресурсов.

Описание

Вернуть все имена AssetBundle в базе данных активов.

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

Обновлено 17 ноября 2026 г.