TheInitialProject/Assets/CaoCao/Scripts/Editor/XAsset/Build/Steps/CollectAssets.cs
2024-10-23 16:59:02 +08:00

25 lines
712 B
C#

namespace CaoCao.Editor
{
public class CollectAssets : IBuildJobStep
{
public void Start(BuildJob job)
{
foreach (var group in job.parameters.groups)
{
if (group == null)
{
XAsset.Logger.W($"Group is missing in build {job.parameters.name}");
continue;
}
group.build = job.parameters.name;
var assets = Settings.Collect(group);
foreach (var asset in assets)
{
asset.bundle = Settings.PackAsset(asset);
job.AddAsset(asset);
}
}
}
}
}