|
@@ -9,18 +9,19 @@ public class GameLauncher : MonoBehaviour
|
|
|
private void Awake()
|
|
|
{
|
|
|
DontDestroyOnLoad(gameObject);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
void Start()
|
|
|
{
|
|
|
- InitBugly();
|
|
|
Screen.sleepTimeout = SleepTimeout.NeverSleep;
|
|
|
Application.runInBackground = true;
|
|
|
LauncherConfig.InitScriptCompilation();
|
|
|
FGUILauncher.Init();
|
|
|
HealthAdviceView.Instance.Open();
|
|
|
+ InitBugly();
|
|
|
+
|
|
|
int time = LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL ? 1 : 10;
|
|
|
Timers.inst.Add(time, 1, (object param) =>
|
|
|
{
|
|
@@ -103,7 +104,14 @@ public class GameLauncher : MonoBehaviour
|
|
|
#if UNITY_IPHONE || UNITY_IOS
|
|
|
BuglyAgent.InitWithAppId (BuglyAppIDForiOS);
|
|
|
#elif UNITY_ANDROID
|
|
|
- BuglyAgent.InitWithAppId("766c5bdb0f");
|
|
|
+ if (LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL)
|
|
|
+ {
|
|
|
+ BuglyAgent.InitWithAppId("766c5bdb0f");
|
|
|
+ }
|
|
|
+ else if (LauncherConfig.netType == LauncherConfig.EnumNetType.DEV)
|
|
|
+ {
|
|
|
+ BuglyAgent.InitWithAppId("b6d0b1b8c5");
|
|
|
+ }
|
|
|
#endif
|
|
|
// 如果你确认已在对应的iOS工程或Android工程中初始化SDK,那么在脚本中只需启动C#异常捕获上报功能即可
|
|
|
BuglyAgent.EnableExceptionHandler();
|