summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/Bugly/XBuglyMgr.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/Bugly/XBuglyMgr.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/Bugly/XBuglyMgr.cs')
-rw-r--r--Client/Assets/Scripts/Bugly/XBuglyMgr.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/Bugly/XBuglyMgr.cs b/Client/Assets/Scripts/Bugly/XBuglyMgr.cs
new file mode 100644
index 00000000..0a90ac8d
--- /dev/null
+++ b/Client/Assets/Scripts/Bugly/XBuglyMgr.cs
@@ -0,0 +1,55 @@
+
+
+using UnityEngine;
+using XUtliPoolLib;
+using System.Collections;
+using System;
+using System.Text;
+#if !DISABLE_JOYSDK
+using Assets.SDK;
+#endif
+
+
+public class XBuglyMgr : MonoBehaviour, IXBuglyMgr
+{
+ #if !DISABLE_JOYSDK
+ private JoyYouSDK _interface;
+ #endif
+ void Awake()
+ {
+ #if !DISABLE_JOYSDK
+ _interface = new JoyYouSDK();
+ #endif
+
+#if BUGLY
+ BuglyAgent.ConfigDebugMode(false);
+ switch (Application.platform)
+ {
+ case RuntimePlatform.IPhonePlayer:
+ BuglyAgent.InitWithAppId("i1105309683");
+ break;
+ case RuntimePlatform.Android:
+ BuglyAgent.InitWithAppId("1105309683");
+ break;
+ }
+ BuglyAgent.EnableExceptionHandler();
+#endif
+ }
+
+ public void ReportCrashToBugly(string serverid, string rolename, uint rolelevel, int roleprof, string openid, string version, string realtime, string scenename, string sceneid, string content)
+ {
+#if BUGLY
+ //((IHuanlePlatform)_interface).SendGameExtData("BuglyReport", token.ToString());
+ BuglyAgent.ReportException("Exception", string.Format("ServerID: {0} RoleName: {1} RoleLevel: {2} RoleProf: {3} OpenID: {4} Version: {5} RealTime: {6} SceneName: {7}({8})",
+ serverid, rolename, rolelevel, roleprof, openid, version, realtime, scenename, sceneid), content);
+#endif
+ }
+
+ public bool Deprecated
+ {
+ get;
+ set;
+ }
+}
+
+