Esempio n. 1
0
        public static AssetDatabase buildDatabase(Manifest manifest, String assetDirectory, string overrideDirectory)
        {
            AssetDatabase assets = new AssetDatabase(manifest);

            assets.overrideDirectory = overrideDirectory;
            Debug.Log("manifest64:" + manifest.getIs64());
            string[] files = Directory.GetFiles(assetDirectory);
            foreach (string file in files)
            {
                // ignore 32bit assets if using 64 bit manifest and vice versa
                if (manifest.getIs64() && file.Contains("assets32"))
                {
                    continue;
                }
                else if (!manifest.getIs64() && file.Contains("assets64"))
                {
                    continue;
                }
                try
                {
                    AssetFile af = buildAssetFileDatabase(file, manifest);
                    if (af != null)
                    {
                        assets.add(af);
                    }
                }
                catch (Exception ex)
                {
                    Debug.LogException(ex);
                }
            }
            return(assets);
        }
Esempio n. 2
0
 public AssetDatabase(Manifest manifest)
 {
     is64          = manifest.getIs64();
     this.manifest = manifest;
 }