private static void SetCurrentScene(int sceneId) { try { object[] args = new object[] { sceneId }; UnityAgent.Call("setScene", args); } catch { } }
private static void SetUserInfo(string userInfo) { try { object[] args = new object[] { userInfo }; UnityAgent.Call("setUserId", args); } catch { } }
private static void ReportException(int type, string name, string reason, string stackTrace, bool quitProgram) { try { object[] args = new object[] { name, reason, stackTrace, quitProgram }; UnityAgent.Call("traceException", args); } catch { } }
private static void AddKeyAndValueInScene(string key, string value) { try { object[] args = new object[] { key, value }; UnityAgent.Call("addSceneValue", args); } catch { } }
private static void EnableDebugMode(bool enable) { _debugMode = enable; try { object[] args = new object[] { enable }; UnityAgent.Call("setLogEnable", args); } catch { } }
private static void LogToConsole(LogSeverity level, string message) { if ((_debugMode || (level == LogSeverity.Log)) || (level >= LogSeverity.LogInfo)) { try { object[] args = new object[] { string.Format("[BuglyAgent] <{0}> - {1}", level.ToString(), message) }; UnityAgent.Call("printLog", args); } catch { } } }
private static void InitUnityAgent(string appId) { if (!IsInitialized) { try { object[] args = new object[] { appId, _configChannel, _configVersion, _configUser, _configDelayTime }; UnityAgent.Call("initWithConfiguration", args); _isInitialized = true; } catch { } } }