Esempio n. 1
0
        public void CookCustomAssets(List <string> assets)
        {
            CookingRulesMap = CookingRulesBuilder.Build(The.Workspace.AssetFiles, Target);

            var defaultAssetsEnumerator = The.Workspace.AssetFiles;
            var assetsFileInfo          = assets
                                          .Select(asset => new FileInfo {
                Path = asset, LastWriteTime = DateTime.Now
            })
                                          .ToList();

            The.Workspace.AssetFiles = new CustomFilesEnumerator(defaultAssetsEnumerator.Directory, assetsFileInfo);

            var defaultCookingProfile = AssetCooker.cookingProfile;

            AssetCooker.cookingProfile = CookingProfile.Partial;

            CookBundles(GetListOfAllBundles(), false);
            The.Workspace.AssetFiles   = defaultAssetsEnumerator;
            AssetCooker.cookingProfile = defaultCookingProfile;
        }
Esempio n. 2
0
        public static void CookCustomAssets(TargetPlatform platform, List <string> assets)
        {
            AssetCooker.Platform = platform;
            cookingRulesMap      = CookingRulesBuilder.Build(The.Workspace.AssetFiles, The.Workspace.ActiveTarget);

            var defaultAssetsEnumerator = The.Workspace.AssetFiles;
            var assetsFileInfo          = assets
                                          .Select(asset => new FileInfo {
                Path = asset, LastWriteTime = DateTime.Now
            })
                                          .ToList();

            The.Workspace.AssetFiles = new CustomFilesEnumerator(defaultAssetsEnumerator.Directory, assetsFileInfo);

            var defaultCookingProfile = AssetCooker.cookingProfile;

            AssetCooker.cookingProfile = CookingProfile.Partial;

            CookBundles(requiredCookCode: false);
            The.Workspace.AssetFiles   = defaultAssetsEnumerator;
            AssetCooker.cookingProfile = defaultCookingProfile;
        }