public static bool GetWhiteList(MAuthor author) { #if MHY_DEBUG if (IsMainThread) { if (commonLogWhiteList == -1) { if (PlayerPrefs.HasKey("CommonLogWhiteList")) { commonLogWhiteList = PlayerPrefs.GetInt("CommonLogWhiteList"); } else { return(true); } } return(((commonLogWhiteList >> (int)author) & 1) == 1); } else { if (commonLogWhiteList == -1) { return(true); } else { return(((commonLogWhiteList >> (int)author) & 1) == 1); } } #else return(true); #endif }
public static void LogWarning(MAuthor _author, object _message) { if (GetWhiteList(_author)) { Debug.LogWarning($"[{author[(int)_author]}] {_message}"); } }
public static void LogWarning(MAuthor _author, object _message, MHandler _handler) { if (GetWhiteList(_author)) { Debug.LogWarning($"[{author[(int)_author]}] {_message}, 请找<color=#00ff00>{handler[(int)_handler]}</color>解决"); } }
public static void Log(MAuthor _author, object _message) { if (GetWhiteList(_author)) { Log($"#{author[(int)_author]}# {_message}"); } }