1. 编辑器界面支持本地化配置。 2. 资源构建过程中的异常输出增加错误码提示。 3. 修复了资源构建界面乱码问题。 4. 修复了自动收集着色器对依赖资源无效的问题。
38 lines
675 B
C#
38 lines
675 B
C#
using System;
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace YooAsset.Editor
|
|
{
|
|
internal static class BuildLogger
|
|
{
|
|
private static bool _enableLog = true;
|
|
|
|
public static void InitLogger(bool enableLog)
|
|
{
|
|
_enableLog = enableLog;
|
|
}
|
|
|
|
public static void Log(string message)
|
|
{
|
|
if (_enableLog)
|
|
{
|
|
Debug.Log(message);
|
|
}
|
|
}
|
|
public static void Warning(string message)
|
|
{
|
|
Debug.LogWarning(message);
|
|
}
|
|
public static void Error(string message)
|
|
{
|
|
Debug.LogError(message);
|
|
}
|
|
|
|
public static string GetErrorMessage(ErrorCode code, string message)
|
|
{
|
|
return $"[ErrorCode{(int)code}] {message}";
|
|
}
|
|
}
|
|
} |