43 lines
884 B
C#
43 lines
884 B
C#
|
using UnityEngine;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System;
|
|||
|
using GameCore;
|
|||
|
namespace GameLogic
|
|||
|
{
|
|||
|
// 数数 数据平台
|
|||
|
public class BuglyConfig : MonoBehaviour
|
|||
|
{
|
|||
|
|
|||
|
public string appid = "";
|
|||
|
void Start()
|
|||
|
{
|
|||
|
BuglyManager.Instance.SetAppId(appid);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
public class BuglyManager : UnitySingleton<BuglyManager>
|
|||
|
{
|
|||
|
public static string appId = "";
|
|||
|
|
|||
|
public void SetAppId(string appId)
|
|||
|
{
|
|||
|
BuglyManager.appId = appId;
|
|||
|
}
|
|||
|
|
|||
|
public void Init()
|
|||
|
{
|
|||
|
// bugly
|
|||
|
if(appId == "")
|
|||
|
{
|
|||
|
appId = VersionManager.Instance.GetVersionInfo("buglyId");
|
|||
|
}
|
|||
|
Debug.Log("Bugly Init: " + appId);
|
|||
|
BuglyAgent.InitWithAppId(appId);
|
|||
|
BuglyAgent.EnableExceptionHandler();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|