Commit 8ed4779b authored by 王雪伟's avatar 王雪伟

加入bugly 修改umeng

parent 354e08ac
fileFormatVersion: 2
guid: 4de77bfbd9c014146a2b371280ff0f63
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9216b5ab3159c44e594fa8e3a6bfcd90
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using AOT; using AOT;
using UnityEngine; using UnityEngine;
public class iOSHander public class iOSHander
{ {
private iOSHander() { } private iOSHander() { }
private static readonly iOSHander singleInstance = new iOSHander(); private static readonly iOSHander singleInstance = new iOSHander();
public static iOSHander Instance public static iOSHander Instance
...@@ -15,36 +15,40 @@ public class iOSHander ...@@ -15,36 +15,40 @@ public class iOSHander
{ {
return singleInstance; return singleInstance;
} }
} }
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ResultHandler(string device, string IDFA); public delegate void ResultHandler(string device, string IDFA);
[MonoPInvokeCallback(typeof(ResultHandler))] [MonoPInvokeCallback(typeof(ResultHandler))]
static void resultHandler(string deviceStr, string IDFAStr) static void resultHandler(string deviceStr, string IDFAStr)
{ {
Debug.Log("resultHandler : deviceStr = " + deviceStr + "IDFAStr = " + IDFAStr); Debug.Log("resultHandler : deviceStr = " + deviceStr + "IDFAStr = " + IDFAStr);
Constant.Instance.device = deviceStr; Constant.Instance.device = deviceStr;
Constant.Instance.idfa = IDFAStr; Constant.Instance.idfa = IDFAStr;
Constant.Instance.aid = deviceStr; Constant.Instance.aid = deviceStr;
} }
#if UNITY_IOS
[DllImport("__Internal")] [DllImport("__Internal")]
static extern void BridageDeviceAndIDFA(IntPtr resultHandler); static extern void BridageDeviceAndIDFA(IntPtr resultHandler);
public void Handler()
public void Handler() {
{ ResultHandler handler = new ResultHandler(resultHandler);
ResultHandler handler = new ResultHandler(resultHandler); IntPtr fp = Marshal.GetFunctionPointerForDelegate(handler);
IntPtr fp = Marshal.GetFunctionPointerForDelegate(handler); BridageDeviceAndIDFA(fp);
BridageDeviceAndIDFA(fp); }
} #endif
}
}
...@@ -33,9 +33,12 @@ public class Splash : MonoBehaviour ...@@ -33,9 +33,12 @@ public class Splash : MonoBehaviour
{ {
EventUtils.OnEvent("app_start"); EventUtils.OnEvent("app_start");
getPermission(); getPermission();
#if UNITY_ANDROID
BuglyAgent.EnableExceptionHandler(); BuglyAgent.EnableExceptionHandler();
#endif
} }
/// <summary> /// <summary>
/// 初始化 /// 初始化
/// </summary> /// </summary>
......
...@@ -34,6 +34,7 @@ GraphicsSettings: ...@@ -34,6 +34,7 @@ GraphicsSettings:
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: [] m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0} type: 0}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment