private static void LoadAllTiles() { foreach (TileType tileType in Enum.GetValues(typeof(TileType))) { string path = TilePaths.Get(tileType); if (path != null) { LayerTile[] loadedTiles = Resources.LoadAll <LayerTile>(path); loadedTiles.ToList().ForEach(x => tiles[tileType, x.name] = x); } } }
public bool CacheAllAssets() { layerTileCollections.Clear(); foreach (TileType tileType in Enum.GetValues(typeof(TileType))) { string path = TilePaths.Get(tileType); if (path != null) { layerTileCollections.Add(new TilePathEntry { path = path, tileType = tileType, layerTiles = Resources.LoadAll <LayerTile>(path).ToList() }); } } return(true); }