mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
This commit is contained in:
@@ -2,80 +2,80 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
/// 自定义日志处理
|
||||
/// </summary>
|
||||
public interface ILogger
|
||||
{
|
||||
void Log(string message);
|
||||
void Warning(string message);
|
||||
void Error(string message);
|
||||
void Exception(System.Exception exception);
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义日志处理
|
||||
/// </summary>
|
||||
public interface ILogger
|
||||
{
|
||||
void Log(string message);
|
||||
void Warning(string message);
|
||||
void Error(string message);
|
||||
void Exception(System.Exception exception);
|
||||
}
|
||||
|
||||
internal static class YooLogger
|
||||
{
|
||||
public static ILogger Logger = null;
|
||||
internal static class YooLogger
|
||||
{
|
||||
public static ILogger Logger = null;
|
||||
|
||||
/// <summary>
|
||||
/// 日志
|
||||
/// </summary>
|
||||
[Conditional("DEBUG")]
|
||||
public static void Log(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Log(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.Log(info);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 日志
|
||||
/// </summary>
|
||||
[Conditional("DEBUG")]
|
||||
public static void Log(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Log(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.Log(info);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 警告
|
||||
/// </summary>
|
||||
public static void Warning(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Warning(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogWarning(info);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 警告
|
||||
/// </summary>
|
||||
public static void Warning(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Warning(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogWarning(info);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 错误
|
||||
/// </summary>
|
||||
public static void Error(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Error(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogError(info);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 错误
|
||||
/// </summary>
|
||||
public static void Error(string info)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Error(info);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogError(info);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异常
|
||||
/// </summary>
|
||||
public static void Exception(System.Exception exception)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Exception(exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 异常
|
||||
/// </summary>
|
||||
public static void Exception(System.Exception exception)
|
||||
{
|
||||
if (Logger != null)
|
||||
{
|
||||
Logger.Exception(exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user