// ------------------------------------------- /// <summary> /// Prints the debug and the debugLog(msg) callback is invoked. Useful for custom console implementations. /// The pref allows you to specify a Debug Preference (message, warning, error) /// </summary> public static void Debug(object msg, DebugPreference pref = DebugPreference.Message) { //push to Unity console switch (pref) { case DebugPreference.Message: U.Debug.Log(msg); break; case DebugPreference.Warning: U.Debug.LogWarning(msg); break; case DebugPreference.Error: U.Debug.LogError(msg); break; } if (debugLog != null) { debugLog(msg); } }
/// <summary> /// CreateDebugPerfStruct is a helper method to populate DebugPreference /// </summary> /// <param name="AppDomainNames">App Domain Names</param> /// <returns>DebugPreference</returns> private static DebugPreference CreateDebugPreference(string[] AppDomainNames) { DebugPreference DebugPreference = new DebugPreference(); DebugPreference.AppDomainNames = AppDomainNames; return DebugPreference; }