We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a728ad commit bed1b85Copy full SHA for bed1b85
AquaMai/AquaMai.Mods/Utils/LogUnity.cs
@@ -0,0 +1,23 @@
1
+using AquaMai.Config.Attributes;
2
+using MelonLoader;
3
+using UnityEngine;
4
+
5
+namespace AquaMai.Mods.Utils;
6
7
+[ConfigSection(
8
+ en: "Output Unity logs (for debugging purposes)",
9
+ zh: "输出 Unity 日志(调试用)",
10
+ exampleHidden: true)]
11
+public static class LogUnity
12
+{
13
+ public static void OnBeforePatch()
14
+ {
15
+ Application.logMessageReceived += Log;
16
+ }
17
18
+ private static void Log(string msg, string stackTrace, LogType type)
19
20
+ MelonLogger.Msg("[Unity] " + msg);
21
+ MelonLogger.Msg("[Unity] " + stackTrace);
22
23
+}
0 commit comments