Esempio n. 1
0
        static AssetDatabase InitializeDatabase()
        {
            if (AssetDirectory == null)
            {
                throw new Exception("Assets directory was null");
            }

            if (AssetManifest == null)
            {
                throw new Exception("Assets manifest was null");
            }

            return(AssetProcessor.buildDatabase(Manifest, AssetDirectory, AssetOverrideDirectory));
        }
Esempio n. 2
0
        private void init()
        {
            overrideDirectory = ProgramSettings.get("ASSETS_OVERRIDE_DIR");
            assetsDirectory   = ProgramSettings.get("ASSETS_DIR");
            if (assetsDirectory == null)
            {
                throw new Exception("Assets directory was null");
            }
            assetsManifest = ProgramSettings.get("ASSETS_MANIFEST");
            if (assetsManifest == null)
            {
                throw new Exception("Assets manifest was null");
            }


            if (overrideDirectory != null)
            {
                Debug.Log("Detected override directory, checking for validity");
                // check the override directory for a manifest
                string manifestName       = Path.GetFileName(assetsManifest);
                string overriddenManifest = overrideDirectory + Path.DirectorySeparatorChar + manifestName;
                Debug.Log("checking for overriden manifest:" + overriddenManifest);
                if (File.Exists(overriddenManifest))
                {
                    assetsManifest = overriddenManifest;
                    Debug.Log("Found overriden manifest");
                }
                else
                {
                    Debug.Log("No valid overide manifest found");
                }
            }

            manifest = new Manifest(assetsManifest);
            db       = AssetProcessor.buildDatabase(manifest, assetsDirectory, overrideDirectory);
        }