Support fast build mode.

支持快速构建模式,真实的实现EditorPlayMode的运行时环境。
This commit is contained in:
hevinci
2022-05-02 23:15:09 +08:00
parent 8d02406211
commit 665a16fe60
39 changed files with 492 additions and 383 deletions

View File

@@ -8,6 +8,8 @@ namespace YooAsset.Editor
{
public class BuildRunner
{
public static bool EnableLog = true;
/// <summary>
/// 执行构建流程
/// </summary>
@@ -26,7 +28,7 @@ namespace YooAsset.Editor
try
{
var taskAttribute = task.GetType().GetCustomAttribute<TaskAttribute>();
Debug.Log($"---------------------------------------->{taskAttribute.Desc}");
Log($"---------------------------------------->{taskAttribute.Desc}");
task.Run(context);
}
catch (Exception e)
@@ -41,5 +43,16 @@ namespace YooAsset.Editor
// 返回运行结果
return succeed;
}
/// <summary>
/// 普通日志输出
/// </summary>
public static void Log(string info)
{
if (EnableLog)
{
UnityEngine.Debug.Log(info);
}
}
}
}