腾讯MSDK for Unity
发布日期:2021-06-30 19:38:04
浏览次数:4
分类:技术文章
本文共 2429 字,大约阅读时间需要 8 分钟。
首先下载官方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)
转载地址:https://linxinfa.blog.csdn.net/article/details/46760129 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
表示我来过!
[***.240.166.169]2024年05月02日 06时35分53秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
nginx实现负载均衡和动静分离
2019-04-30
SaltStack
2019-04-30
Packer 如何将 JSON 的配置升级为 HCL2
2019-04-30
Ubuntu 安装 NTP 服务
2019-04-30
NeoFetch - Linux 使用命令行查看系统信息
2019-04-30
Jenkins 控制台输出中的奇怪字符
2019-04-30
Linux添加系统调用
2019-04-30
ubuntu 18 CTF 环境搭建
2019-04-30
linux内存的寻址方式
2019-04-30
[off by null + tcache dup]lctf_easy_heap
2019-04-30
[pie+libc]national2021_pwny
2019-04-30
task_struct 结构分析
2019-04-30
Linux创建进程的源码分析
2019-04-30
ubunut16.04的pip3出现问题,重新安装pip3
2019-04-30
how2heap-double free
2019-04-30
how2heap-fastbin_dup_consolidate
2019-04-30
orw_shellcode_模板
2019-04-30
[fmt+shellcode]string
2019-04-30