Last active
December 28, 2015 02:50
-
-
Save twobob/0391e67f2825ec024337 to your computer and use it in GitHub Desktop.
Simple helper Editor method to list out all known asset bundles and their bundle-names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
public class ListBundles : MonoBehaviour | |
{ | |
[MenuItem("Assets/AssetBundles/List AssetBundles %#l")] | |
static void List() | |
{ | |
Debug.Log("<color=#ffff00ff>Search Initialising</color>, Please be patient"); | |
string assetPath = string.Empty; | |
string bundleName = string.Empty; | |
foreach (var assetGuid in AssetDatabase.FindAssets("")) | |
{ | |
assetPath = AssetDatabase.GUIDToAssetPath(assetGuid); | |
bundleName = AssetImporter.GetAtPath(assetPath).assetBundleName; | |
if (string.IsNullOrEmpty(bundleName)) | |
{ | |
continue; | |
} | |
Debug.Log("Found asset: (GUID:<color=#00ffffff>" + assetGuid + "</color>) " + assetPath + ", AssetBundle: " + bundleName); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment