예제 #1
0
        public static List <T> OfType <T>(this HUMAssets.Data.Assets assets) where T : UnityEngine.Object
        {
            var assetIds   = UnityEditor.AssetDatabase.FindAssets("t:" + typeof(T).FullName);
            var assetsList = new List <T>();

            foreach (string assetId in assetIds)
            {
                var asset = UnityEditor.AssetDatabase.LoadAssetAtPath <T>(UnityEditor.AssetDatabase.GUIDToAssetPath(assetId));
                assetsList.Add(asset);
            }

            return(assetsList);
        }
예제 #2
0
 public static HUMAssets.Data.AssetsWith With(this HUMAssets.Data.Assets assets)
 {
     return(new HUMAssets.Data.AssetsWith(assets));
 }