| | |
| | | |
| | | public string GetDeviceId() |
| | | { |
| | | return TalkingDataGA.GetDeviceId(); |
| | | //return TalkingDataGA.GetDeviceId(); |
| | | return ""; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public void SDKInit(string channelId) |
| | | { |
| | | Debug.Log("Unity SDK init begin channelId:" + channelId); |
| | | TalkingDataGA.BackgroundSessionEnabled(); |
| | | TalkingDataGA.OnStart("B220F5C737384030947B202F19E32086", channelId);//appID是定死的 |
| | | //TalkingDataGA.BackgroundSessionEnabled(); |
| | | //TalkingDataGA.OnStart("B220F5C737384030947B202F19E32086", channelId);//appID是定死的 |
| | | Debug.Log("Unity SDK init completed "); |
| | | } |
| | | |
| | | TDGAAccount account;//当前账户 |
| | | //TDGAAccount account;//当前账户 |
| | | |
| | | /// <summary> |
| | | /// 登录,使用自定义的 |
| | |
| | | /// <param name="deviceID"></param> |
| | | public void Login(string deviceID) |
| | | { |
| | | account = TDGAAccount.SetAccount(TalkingDataGA.GetDeviceId()); |
| | | account.SetAccountType(AccountType.ANONYMOUS); |
| | | //account = TDGAAccount.SetAccount(TalkingDataGA.GetDeviceId()); |
| | | //account.SetAccountType(AccountType.ANONYMOUS); |
| | | } |
| | | |
| | | /* |
| | |
| | | /// <param name="wave">第几波</param> |
| | | public void WaveDone(int level, int wave) |
| | | { |
| | | Debug.LogError($"玩家达到第{level}关{wave}波"); |
| | | Debug.Log($"玩家达到第{level}关{wave}波"); |
| | | Dictionary<string, object> dic = new Dictionary<string, object> |
| | | { |
| | | { $"第{level}关{wave}波", 1} |
| | |
| | | private void OnDestroy() |
| | | { |
| | | Debug.Log("onDestroy"); |
| | | TalkingDataGA.OnEnd(); |
| | | //TalkingDataGA.OnEnd(); |
| | | } |
| | | } |