效果如下: 源码如下: using System.Collections.Generic; using UnityEditor; using UnityEngine; namespace XM.Editor { public class AssetBundleCreator : EditorWindow { [MenuItem("Tools/Build Asset Bundle")] public static void BuildAssetBundle() { var win = G
public static List<T> GetAssetsWithScript<T>(string path) where T:MonoBehaviour { T tmp; string assetPath; GameObject asset; List<T> assetList = new List<T> (); string[] guids = AssetDatabase.FindAssets ("t:Prefab", new s