腾讯MSDK for Unity
来源:互联网 发布:中国未来国运如何 知乎 编辑:程序博客网 时间:2024/06/05 02:14
首先下载官方MSDK for unity
创建一个GameObject并命名为Msdk,它将作为MSDK回调物体
bugly上报模块
初始化
void InitBugly() {// 开启SDK的调式开关 Bugly.EnableLog (true);// 设置C#堆栈日志捕获的级别,默认为Exception,可以选择为Assert、Error等Bugly.RegisterHandler (LogSeverity.Exception);// 如果你已经在Unity项目导出的Android或iOS工程中进行了SDK的初始化,则只需调用此方法完成C#堆栈捕获功能的开启Bugly.EnableExceptionHandler();}
回调
using com.tencent.bugly.unity3d;public class BuglyInit : MonoBehaviour { // this is for iOS public string BuglyAppIdForIOS = ""; public string BuglyAppChannelForIOS = ""; public string BuglyAppVersionForIOS = ""; //public bool AutoThrow = true; // this will be config by editor public string GameObjectForCallback = ""; public bool DebugEnable = false; public LogSeverity LogLevel = LogSeverity.Exception; // this is for android public string BuglyAppIdForAndroid = ""; public string AppVersionForAndroid = ""; public string AppChannelForAndroid = ""; public string ReportDelayTimeForAndroid = ""; void Awake () { DontDestroyOnLoad (this.gameObject); Debugger.setDebugLevel(LogSeverity.Log); Bugly.SetGameObjectForCallback (GameObjectForCallback); Bugly.EnableLog (DebugEnable); Bugly.RegisterHandler (LogLevel); #if UNITY_IPHONE Bugly.SetAppVersion (BuglyAppVersionForIOS); Bugly.SetChannel (BuglyAppChannelForIOS); Bugly.InitSDK (BuglyAppIdForIOS); Bugly.SetGameObjectForCallback("Bugly"); Bugly.SetCrashHappenCallback ("_callbackCrashHappen"); #endif #if UNITY_ANDROID Bugly.SetAppVersion (AppVersionForAndroid); Bugly.SetChannel (AppChannelForAndroid); Bugly.SetReportDelayTime(ReportDelayTimeForAndroid); Bugly.InitSDK (BuglyAppIdForAndroid); #endif } void _callbackCrashHappen(string data){ Debugger.Debug ("on crash callback"); if (data != null) { Debugger.Info("receive message :" + data); } }}手Q微信授权登陆
接口
WGPlatform.Instance.WGLoginQQ ();
WGPlatform.Instance.WGLoginWX ();回调
void OnLoginNotify(string jsonRet)查询个人信息
接口
WGPlatform.Instance.WGQueryMyQQInfo ();
WGPlatform.Instance.WGQueryMyWXInfo();回调
void OnRelationNotify(string jsonRet)同玩好友信息
接口
WGPlatform.Instance.WGQueryQQGameFriendsInfo ();
WGPlatform.Instance.WGQueryWXGameFriendsInfo();回调
void OnRelationNotify(string jsonRet)
0 0
- 腾讯MSDK for Unity
- 腾讯新版MSDK for Unity
- 腾讯MSDK接入untiy3d游戏
- 接入腾讯MSDK例子出现的问题
- 腾讯MSDK手Q微信授权登录
- 腾讯移动游戏平台SDK(MSDK) ios版Ane扩展 过程中所遇到的问题
- Unity接腾讯云语音
- for腾讯2013实习生
- 关于MSDK的几个难点
- experience for unity
- unity Profiler for Android
- Raknet For Unity
- protobuf3 for unity
- unity for android 开发
- Daydream for Unity體驗版發佈
- AssetBundle for unity
- kinect for Unity开发
- 初探腾讯Unity手游热更新方案xlua
- CodeBlocks中文乱码
- 生活
- 开灯问题
- u4初步使用整理(二)
- C++Mfc中读出文件夹里面的相关文件
- 腾讯MSDK for Unity
- DOM 中的Element详解
- 你真的懂iOS的autorelease吗?
- PHP+Ajax实时自动检测是否联网的实现代码
- 转载hadoop实践路上异常问题以及相关解决方法记录
- 电子商务网站,前后台是否该分离?
- 11111
- QT中遇到的一些问题
- linux命令简单编译C代码