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

            foreach (string assetId in assetIds)
            {
                var asset = UnityEditor.AssetDatabase.LoadAssetAtPath <UnityEngine.Object>(UnityEditor.AssetDatabase.GUIDToAssetPath(assetId)) as T;
                if (asset != null)
                {
                    assetsList.Add(asset);
                }
            }

            return(assetsList);
        }
Ejemplo n.º 2
0
 public static HUMAssets.Data.AssetsWith With(this HUMAssets.Data.Assets assets)
 {
     return(new HUMAssets.Data.AssetsWith(assets));
 }