示例#1
0
 private static void SetCurrentScene(int sceneId)
 {
     try
     {
         object[] args = new object[] { sceneId };
         UnityAgent.Call("setScene", args);
     }
     catch
     {
     }
 }
示例#2
0
 private static void SetUserInfo(string userInfo)
 {
     try
     {
         object[] args = new object[] { userInfo };
         UnityAgent.Call("setUserId", args);
     }
     catch
     {
     }
 }
示例#3
0
 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
     {
     }
 }
示例#4
0
 private static void AddKeyAndValueInScene(string key, string value)
 {
     try
     {
         object[] args = new object[] { key, value };
         UnityAgent.Call("addSceneValue", args);
     }
     catch
     {
     }
 }
示例#5
0
 private static void EnableDebugMode(bool enable)
 {
     _debugMode = enable;
     try
     {
         object[] args = new object[] { enable };
         UnityAgent.Call("setLogEnable", args);
     }
     catch
     {
     }
 }
示例#6
0
 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
         {
         }
     }
 }
示例#7
0
 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
         {
         }
     }
 }