Optimize packaging bundle core logic

优化了打包的核心逻辑,支持设置依赖资源收集器。
This commit is contained in:
hevinci
2022-04-30 23:14:20 +08:00
parent b443a1c308
commit 650d8689ee
22 changed files with 162 additions and 85 deletions
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
namespace YooAsset.Editor
@@ -24,6 +25,8 @@ namespace YooAsset.Editor
IBuildTask task = pipeline[i];
try
{
var taskAttribute = task.GetType().GetCustomAttribute<TaskAttribute>();
Debug.Log($"---------------------------------------->{taskAttribute.Desc}");
task.Run(context);
}
catch (Exception e)
@@ -0,0 +1,14 @@
using System;
namespace YooAsset.Editor
{
[AttributeUsage(AttributeTargets.Class)]
public class TaskAttribute : Attribute
{
public string Desc;
public TaskAttribute(string desc)
{
Desc = desc;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 35749e57d9a3da84aa60c348bc6bbe9d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: