using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; class ExceptionReporter { bool bInit = false; public ExceptionReporter() { } public void init(String androidAppID,String iosAppID){ #if UNITY_ANDROID BuglyAgent.InitWithAppId(androidAppID); #elif UNITY_IPHONE BuglyAgent.InitWithAppId(iosAppID); #endif BuglyAgent.EnableExceptionHandler(); bInit = true; } public void setUserID(String userID){ if (bInit == false) return; BuglyAgent.SetUserId (userID); } public void AddUserValue(String key,String value){ if (bInit == false) return; BuglyAgent.AddSceneData (key, value); } }