public static void BuildAssetBundles() { var buildTimer = new Stopwatch(); buildTimer.Start(); var input = BuildInterface.GenerateBuildInput(); var settings = GenerateBuildSettings(); var compression = BuildCompression.DefaultUncompressed; // Rebuild sprite atlas cache for correct dependency calculation & writting Packer.RebuildAtlasCacheIfNeeded(settings.target, true, Packer.Execution.Normal); // Generate command set BuildCommandSet commands; var packer = new Unity5Packer(); if (!packer.Convert(input, settings.target, out commands)) { return; } //DebugPrintCommandSet(ref commands); // Calculate dependencies BuildCommandSet depCommands; var dependencyCalculator = new Unity5DependencyCalculator(); if (!dependencyCalculator.Convert(commands, out depCommands)) { return; } DebugPrintCommandSet(ref depCommands); // TODO: implement incremental building when LLAPI supports it // Write out resource files BuildOutput output; var resourceWriter = new ResourceWriter(); if (!resourceWriter.Convert(depCommands, settings, out output)) { return; } // Archive and compress resource files uint[] crc; var archiveWriter = new ArchiveWriter(); if (!archiveWriter.Convert(output, compression, settings.outputFolder, out crc)) { return; } // Generate Unity5 compatible manifest files string[] manifestfiles; var manifestWriter = new Unity5ManifestWriter(); if (!manifestWriter.Convert(depCommands, output, crc, settings.outputFolder, out manifestfiles)) { return; } buildTimer.Stop(); BuildLogger.Log("Build Asset Bundles complete in: {0:c}", buildTimer.Elapsed); }