private void OnDebugReceived(object sender, FiroozehGameService.Models.EventArgs.Debug debug) { switch (debug.LogTypeType) { case LogType.Normal: Debug.Log(debug.Data); break; case LogType.Error: Debug.LogError(debug.Data); break; case LogType.Exception: Debug.LogException(debug.Exception); break; default: throw new ArgumentOutOfRangeException(); } if (!EnableSaveDebugLogs) { return; } if (Directory.Exists(_appPath + DebugPath)) { File.AppendAllText(_appPath + DebugPath + _logFile, debug.Data + "\r\n"); } }
private static void Invoke(this Debug debug) { GameService.OnDebugReceived?.Invoke(null, debug); }