update asset bundle builder
parent
254da59b7a
commit
c40224b454
|
@ -37,14 +37,16 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
_buildWatch = Stopwatch.StartNew();
|
_buildWatch = Stopwatch.StartNew();
|
||||||
var taskAttribute = task.GetType().GetCustomAttribute<TaskAttribute>();
|
var taskAttribute = task.GetType().GetCustomAttribute<TaskAttribute>();
|
||||||
BuildLogger.Log($"---------------------------------------->{taskAttribute.Desc}<---------------------------------------");
|
if (taskAttribute != null)
|
||||||
|
BuildLogger.Log($"---------------------------------------->{taskAttribute.Desc}<---------------------------------------");
|
||||||
task.Run(context);
|
task.Run(context);
|
||||||
_buildWatch.Stop();
|
_buildWatch.Stop();
|
||||||
|
|
||||||
// 统计耗时
|
// 统计耗时
|
||||||
int seconds = GetBuildSeconds();
|
int seconds = GetBuildSeconds();
|
||||||
TotalSeconds += seconds;
|
TotalSeconds += seconds;
|
||||||
BuildLogger.Log($"{taskAttribute.Desc}耗时:{seconds}秒");
|
if (taskAttribute != null)
|
||||||
|
BuildLogger.Log($"{taskAttribute.Desc}耗时:{seconds}秒");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -582,7 +582,7 @@ namespace YooAsset.Editor
|
||||||
/// <param name="key">关键字</param>
|
/// <param name="key">关键字</param>
|
||||||
/// <param name="includeKey">分割的结果里是否包含关键字</param>
|
/// <param name="includeKey">分割的结果里是否包含关键字</param>
|
||||||
/// <param name="searchBegin">是否使用初始匹配的位置,否则使用末尾匹配的位置</param>
|
/// <param name="searchBegin">是否使用初始匹配的位置,否则使用末尾匹配的位置</param>
|
||||||
private static string Substring(string content, string key, bool includeKey, bool firstMatch = true)
|
public static string Substring(string content, string key, bool includeKey, bool firstMatch = true)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(key))
|
if (string.IsNullOrEmpty(key))
|
||||||
return content;
|
return content;
|
||||||
|
|
Loading…
Reference in New Issue