Esempio n. 1
0
 public static Dictionary <string, T> GetNamedAssets <T>(string name = "*", bool showWarnings = true) where T : UnityObject
 {
     if (!FileManager.namedAssets.AddNew(typeof(T)).ContainsKey(name))
     {
         var files = FileManager.GetAssets <T>(name, showWarnings).GroupBy(x => x.name).Select(x => x.First());
         FileManager.namedAssets[typeof(T)][name] = files.ToDictionary(x => x.name, x => (UnityObject)x);
     }
     return(FileManager.namedAssets[typeof(T)][name].ToDictionary(x => x.Key, x => (T)x.Value));
 }