58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor.Build.Pipeline;
|
|
using UnityEditor.Build.Pipeline.Interfaces;
|
|
|
|
namespace UnityEditor.Build.Pipeline.Tasks
|
|
{
|
|
public static class SBPBuildTasks
|
|
{
|
|
public static IList<IBuildTask> Create(string builtInShaderBundleName)
|
|
{
|
|
var buildTasks = new List<IBuildTask>();
|
|
|
|
// Setup
|
|
buildTasks.Add(new SwitchToBuildPlatform());
|
|
buildTasks.Add(new RebuildSpriteAtlasCache());
|
|
|
|
// Player Scripts
|
|
buildTasks.Add(new BuildPlayerScripts());
|
|
buildTasks.Add(new PostScriptsCallback());
|
|
|
|
// Dependency
|
|
buildTasks.Add(new CalculateSceneDependencyData());
|
|
#if UNITY_2019_3_OR_NEWER
|
|
buildTasks.Add(new CalculateCustomDependencyData());
|
|
#endif
|
|
buildTasks.Add(new CalculateAssetDependencyData());
|
|
buildTasks.Add(new StripUnusedSpriteSources());
|
|
|
|
#if TUANJIE_1_0_OR_NEWER
|
|
buildTasks.Add(new CreateBuiltInShadersBundle(builtInShaderBundleName));
|
|
#else
|
|
buildTasks.Add(new CreateBuiltInBundle(builtInShaderBundleName));
|
|
#endif
|
|
|
|
buildTasks.Add(new PostDependencyCallback());
|
|
|
|
// Packing
|
|
buildTasks.Add(new GenerateBundlePacking());
|
|
buildTasks.Add(new UpdateBundleObjectLayout());
|
|
buildTasks.Add(new GenerateBundleCommands());
|
|
buildTasks.Add(new GenerateSubAssetPathMaps());
|
|
buildTasks.Add(new GenerateBundleMaps());
|
|
buildTasks.Add(new PostPackingCallback());
|
|
|
|
// Writing
|
|
buildTasks.Add(new WriteSerializedFiles());
|
|
buildTasks.Add(new ArchiveAndCompressBundles());
|
|
buildTasks.Add(new AppendBundleHash());
|
|
buildTasks.Add(new GenerateLinkXml());
|
|
buildTasks.Add(new PostWritingCallback());
|
|
|
|
return buildTasks;
|
|
}
|
|
}
|
|
} |