public static List <string> GetCataloguePathStreamingAssets()
    {
        var pathss      = Application.streamingAssetsPath + "/AddressableCatalogues";
        var Directories = System.IO.Directory.GetDirectories(pathss);
        var Catalogues  = new List <string>();

        foreach (var Directorie in Directories)
        {
            var newpaths       = Directorie.Replace(@"\", "/");
            var directory_info = new DirectoryInfo(newpaths);
            var cataloguePath  = newpaths + "/" + directory_info.Name + ".json";
            if (File.Exists(cataloguePath))
            {
                Catalogues.Add(cataloguePath);
            }
        }

        return(Catalogues);
    }
Пример #2
0
    public static List <string> GetCataloguePathStreamingAssets()
    {
        var pathss      = Application.streamingAssetsPath + "/AddressableCatalogues";
        var Directories = System.IO.Directory.GetDirectories(pathss);
        var Catalogues  = new List <string>();

        foreach (var Directorie in Directories)
        {
            var newpaths       = Directorie.Replace(@"\", "/");
            var newDirectories = System.IO.Directory.GetFiles(newpaths);

            foreach (var pathST in newDirectories)
            {
                if (pathST.Contains(".json"))
                {
                    Catalogues.Add(pathST);
                }
            }
        }

        return(Catalogues);
    }