- 首先自定义项目的Log系统
using UnityEngine;
namespace DAO
{
public static class Logger
{
public static void Log(object obj)
{
if (!AppSetting.DEBUG_ENABLE)
{
return;
}
Debug.Log(obj);
}
public static void Warning(object obj)
{
if (!AppSetting.DEBUG_ENABLE)
{
return;
}
Debug.LogWarning(obj);
}
public static void Error(object obj)
{
if (!AppSetting.DEBUG_ENABLE)
{
return;
}
Debug.LogError(obj);
}
}
}
标签:ENABLE,obj,Log,性能,static,Debug,日志,优化,public
From: https://www.cnblogs.com/morestar/p/16638983.html