Example #1
0
 public static void LogError(object message)
 {
     if (DebugMode)
     {
         SGFirebase.Log("Error: " + message.ToString());
         Debug.LogError(message);
         LogText = "[E]" + message.ToString();
     }
 }
Example #2
0
 public static void LogWarning(object message)
 {
     if (DebugMode)
     {
         SGFirebase.Log("Warning: " + message.ToString());
         Debug.LogWarning(message);
         LogText = "[W]" + message.ToString();
     }
 }
Example #3
0
    public static void ForceException()
    {
        SGFirebase.Log("FORCED EXCEPTION!");
        // Throw an exception implementation
        throw new System.Exception("FORCED EXCEPTION!");
#if UNITY_EDITOR
        // nothing
#else
        // Causes an error that will crash the app at the platform level (Android or iOS)
        throw new InvalidOperationException("FORCED EXCEPTION!");
        Utils.ForceCrash(ForcedCrashCategory.FatalError);
#endif
    }