com.taptap.sdk.core 4.6.2 → 4.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,12 +4,12 @@
4
4
  <repositories>
5
5
  <repository>https://repo.maven.apache.org/maven2</repository>
6
6
  </repositories>
7
- <androidPackage spec="com.taptap.sdk:tap-core-unity:4.6.2"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-core-unity:4.6.3"/>
8
8
  </androidPackages>
9
9
  <iosPods>
10
10
  <sources>
11
11
  <source>https://github.com/CocoaPods/Specs.git</source>
12
12
  </sources>
13
- <iosPod name="TapTapCoreSDK" version="~> 4.5.5" bitcodeEnabled="false" addToAllTargets="false"/>
13
+ <iosPod name="TapTapCoreSDK" version="~> 4.6.3" bitcodeEnabled="false" addToAllTargets="false"/>
14
14
  </iosPods>
15
15
  </dependencies>
@@ -11,69 +11,7 @@ namespace TapSDK.Core.Mobile {
11
11
 
12
12
  #if UNITY_IOS
13
13
  // 导入 C 函数
14
- [DllImport("__Internal")]
15
- private static extern void _TapTapSDKInitWithCoreAndOtherOptions(
16
- string initOptionsJson,
17
- string otherOptionsJson
18
- );
19
-
20
- [DllImport("__Internal")]
21
- private static extern void _TapTapSDKInit(
22
- string initOptionsJson
23
- );
24
14
 
25
- [DllImport("__Internal")]
26
- private static extern void _TapTapEventSetUserID(string userID);
27
-
28
- [DllImport("__Internal")]
29
- private static extern void _TapTapEventSetUserIDWithProperties(string userID, string propertiesJson);
30
-
31
- [DllImport("__Internal")]
32
- private static extern void _TapTapEventClearUser();
33
-
34
- [DllImport("__Internal")]
35
- private static extern string _TapTapEventGetDeviceId();
36
-
37
- [DllImport("__Internal")]
38
- private static extern void _TapTapEventLogEvent(string name, string propertiesJson);
39
-
40
- [DllImport("__Internal")]
41
- private static extern void _TapTapEventLogChargeEvent(string orderID, string productName, long amount, string currencyType, string paymentMethod, string propertiesJson);
42
-
43
- [DllImport("__Internal")]
44
- private static extern void _TapTapEventDeviceInitialize(string propertiesJson);
45
-
46
- [DllImport("__Internal")]
47
- private static extern void _TapTapEventDeviceUpdate(string propertiesJson);
48
-
49
- [DllImport("__Internal")]
50
- private static extern void _TapTapEventDeviceAdd(string propertiesJson);
51
-
52
- [DllImport("__Internal")]
53
- private static extern void _TapTapEventUserInitialize(string propertiesJson);
54
-
55
- [DllImport("__Internal")]
56
- private static extern void _TapTapEventUserUpdate(string propertiesJson);
57
-
58
- [DllImport("__Internal")]
59
- private static extern void _TapTapEventUserAdd(string propertiesJson);
60
-
61
- [DllImport("__Internal")]
62
- private static extern void _TapTapEventAddCommonProperty(string key, string value);
63
-
64
- [DllImport("__Internal")]
65
- private static extern void _TapTapEventAddCommon(string propertiesJson);
66
-
67
- [DllImport("__Internal")]
68
- private static extern void _TapTapEventClearCommonProperty(string key);
69
-
70
- [DllImport("__Internal")]
71
- private static extern void _TapTapEventClearCommonProperties(string[] keys, int count);
72
-
73
- [DllImport("__Internal")]
74
- private static extern void _TapTapEventClearAllCommonProperties();
75
-
76
-
77
15
  // 定义一个委托类型,匹配 Objective-C 中的 block 参数
78
16
  public delegate string DynamicPropertiesCalculatorDelegate();
79
17
 
@@ -81,123 +19,9 @@ namespace TapSDK.Core.Mobile {
81
19
  [DllImport("__Internal")]
82
20
  private static extern void _TapTapEventRegisterDynamicProperties(DynamicPropertiesCalculatorDelegate callback);
83
21
 
84
-
85
- // 插入 UA
86
- [DllImport("__Internal")]
87
- private static extern void _TapTapSDKCoreAppendUA(string platform, string version);
88
-
89
- [DllImport("__Internal")]
90
- private static extern void _TapTapSDKCoreSetSDKArtifact(string artifact);
91
-
92
22
  [DllImport("__Internal")]
93
23
  private static extern void _TapTapSDKCoreSwitchToRND();
94
24
 
95
- // 提供给 Unity 调用的 C# 方法
96
- public static void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions)
97
- {
98
- // 将其他选项转换为JSON字符串
99
- string otherOptionsJson = ConvertOtherOptionsToJson(otherOptions);
100
- // 调用C方法
101
- _TapTapSDKInitWithCoreAndOtherOptions(
102
- JsonUtility.ToJson(coreOption),
103
- otherOptionsJson
104
- );
105
- }
106
-
107
- // 提供给 Unity 调用的 C# 方法
108
- public static void Init(TapTapSdkOptions coreOption)
109
- {
110
- // 调用C方法
111
- _TapTapSDKInit(
112
- JsonUtility.ToJson(coreOption)
113
- );
114
- }
115
-
116
- public static void SetUserID(string userID)
117
- {
118
- _TapTapEventSetUserID(userID);
119
- }
120
-
121
- public static void SetUserID(string userID, string properties)
122
- {
123
- _TapTapEventSetUserIDWithProperties(userID, properties);
124
- }
125
-
126
- public static void ClearUser()
127
- {
128
- _TapTapEventClearUser();
129
- }
130
-
131
- public static string GetDeviceId()
132
- {
133
- return _TapTapEventGetDeviceId();
134
- }
135
-
136
- public static void LogEvent(string name, string properties)
137
- {
138
- _TapTapEventLogEvent(name, properties);
139
- }
140
-
141
- public static void LogChargeEvent(string orderID, string productName, long amount, string currencyType, string paymentMethod, string properties)
142
- {
143
- _TapTapEventLogChargeEvent(orderID, productName, amount, currencyType, paymentMethod, properties);
144
- }
145
-
146
- public static void DeviceInitialize(string properties)
147
- {
148
- _TapTapEventDeviceInitialize(properties);
149
- }
150
-
151
- public static void DeviceUpdate(string properties)
152
- {
153
- _TapTapEventDeviceUpdate(properties);
154
- }
155
-
156
- public static void DeviceAdd(string properties)
157
- {
158
- _TapTapEventDeviceAdd(properties);
159
- }
160
-
161
- public static void UserInitialize(string properties)
162
- {
163
- _TapTapEventUserInitialize(properties);
164
- }
165
-
166
- public static void UserUpdate(string properties)
167
- {
168
- _TapTapEventUserUpdate(properties);
169
- }
170
-
171
- public static void UserAdd(string properties)
172
- {
173
- _TapTapEventUserAdd(properties);
174
- }
175
-
176
- public static void AddCommonProperty(string key, string value)
177
- {
178
- _TapTapEventAddCommonProperty(key, value);
179
- }
180
-
181
- public static void AddCommon(string properties)
182
- {
183
- _TapTapEventAddCommon(properties);
184
- }
185
-
186
- public static void ClearCommonProperty(string key)
187
- {
188
- _TapTapEventClearCommonProperty(key);
189
- }
190
-
191
- public static void ClearCommonProperties(string[] keys)
192
- {
193
- _TapTapEventClearCommonProperties(keys, keys.Length);
194
- }
195
-
196
- public static void ClearAllCommonProperties()
197
- {
198
- _TapTapEventClearAllCommonProperties();
199
- }
200
-
201
25
  public static void SetRND(){
202
26
  _TapTapSDKCoreSwitchToRND();
203
27
  }
@@ -221,53 +45,6 @@ namespace TapSDK.Core.Mobile {
221
45
  return null;
222
46
  }
223
47
 
224
- private static string ConvertOtherOptionsToJson(TapTapSdkBaseOptions[] otherOptions)
225
- {
226
- if (otherOptions == null || otherOptions.Length == 0)
227
- {
228
- return "[]"; // 如果没有其他选项,则返回空数组的JSON表示
229
- }
230
-
231
- // 创建一个数组来存储每个选项的JSON字符串
232
- string[] jsonOptions = new string[otherOptions.Length];
233
-
234
- for (int i = 0; i < otherOptions.Length; i++)
235
- {
236
- // 获取moduleName
237
- string moduleName = otherOptions[i].moduleName;
238
-
239
- // 使用JsonUtility将每个选项对象转换为JSON字符串
240
- string optionJson = JsonUtility.ToJson(otherOptions[i]);
241
-
242
- // 将moduleName添加到JSON字符串中
243
- optionJson = AddModuleNameToJson(optionJson, moduleName);
244
-
245
- jsonOptions[i] = optionJson;
246
- }
247
-
248
- // 将所有JSON字符串连接成一个JSON数组
249
- string jsonArray = "[" + string.Join(",", jsonOptions) + "]";
250
-
251
- return jsonArray;
252
- }
253
-
254
- // 辅助方法,用于将moduleName添加到JSON字符串中
255
- private static string AddModuleNameToJson(string json, string moduleName)
256
- {
257
- // 在JSON字符串的开头添加moduleName字段
258
- return "{\"moduleName\":\"" + moduleName + "\"," + json.TrimStart('{');
259
- }
260
-
261
- // 调用此方法来设置 xuaMap
262
- public static void SetPlatformAndVersion(string platform, string version)
263
- {
264
- _TapTapSDKCoreAppendUA(platform, version);
265
- }
266
-
267
- public static void SetSDKArtifact(string artifact)
268
- {
269
- _TapTapSDKCoreSetSDKArtifact(artifact);
270
- }
271
48
  #endif
272
49
  }
273
50
  }
@@ -17,6 +17,11 @@ namespace TapSDK.Core.Mobile
17
17
  EngineBridgeInitializer.Initialize();
18
18
  }
19
19
 
20
+ public void Init(TapTapEventOptions eventOptions)
21
+ {
22
+
23
+ }
24
+
20
25
  public void SetUserID(string userID)
21
26
  {
22
27
  Debug.Log("TapEventMobile SetUserID = " + userID);
@@ -133,7 +133,7 @@ RectTransform:
133
133
  m_AnchorMin: {x: 0.5, y: 0}
134
134
  m_AnchorMax: {x: 0.5, y: 0}
135
135
  m_AnchoredPosition: {x: 0.5, y: 100}
136
- m_SizeDelta: {x: 400, y: 102.44681}
136
+ m_SizeDelta: {x: 400, y: 100}
137
137
  m_Pivot: {x: 0.5, y: 0.5}
138
138
  --- !u!1 &6224477040733538127
139
139
  GameObject:
@@ -170,10 +170,10 @@ RectTransform:
170
170
  m_Father: {fileID: 3020249884784984160}
171
171
  m_RootOrder: 0
172
172
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
173
- m_AnchorMin: {x: 0, y: 1}
174
- m_AnchorMax: {x: 0, y: 1}
175
- m_AnchoredPosition: {x: 200, y: -51.223404}
176
- m_SizeDelta: {x: 400, y: 0}
173
+ m_AnchorMin: {x: 0.5, y: 1}
174
+ m_AnchorMax: {x: 0.5, y: 1}
175
+ m_AnchoredPosition: {x: 0, y: -50}
176
+ m_SizeDelta: {x: 420, y: 120}
177
177
  m_Pivot: {x: 0.5, y: 0.5}
178
178
  --- !u!222 &6150942826548885810
179
179
  CanvasRenderer:
@@ -202,7 +202,7 @@ MonoBehaviour:
202
202
  m_OnCullStateChanged:
203
203
  m_PersistentCalls:
204
204
  m_Calls: []
205
- m_Sprite: {fileID: 21300000, guid: 9ab00e50019021946837a0c857f4cc5d, type: 3}
205
+ m_Sprite: {fileID: 21300000, guid: 4b23b6267c9a94d64b94d18ac0f19754, type: 3}
206
206
  m_Type: 1
207
207
  m_PreserveAspect: 0
208
208
  m_FillCenter: 1
@@ -219,7 +219,7 @@ MonoBehaviour:
219
219
  m_PrefabInstance: {fileID: 0}
220
220
  m_PrefabAsset: {fileID: 0}
221
221
  m_GameObject: {fileID: 6224477040733538127}
222
- m_Enabled: 1
222
+ m_Enabled: 0
223
223
  m_EditorHideFlags: 0
224
224
  m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
225
225
  m_Name:
@@ -233,8 +233,8 @@ MonoBehaviour:
233
233
  m_Spacing: 0
234
234
  m_ChildForceExpandWidth: 0
235
235
  m_ChildForceExpandHeight: 0
236
- m_ChildControlWidth: 1
237
- m_ChildControlHeight: 1
236
+ m_ChildControlWidth: 0
237
+ m_ChildControlHeight: 0
238
238
  m_ChildScaleWidth: 0
239
239
  m_ChildScaleHeight: 0
240
240
  --- !u!114 &8025106749851834532
@@ -250,7 +250,7 @@ MonoBehaviour:
250
250
  m_Name:
251
251
  m_EditorClassIdentifier:
252
252
  m_HorizontalFit: 0
253
- m_VerticalFit: 2
253
+ m_VerticalFit: 0
254
254
  --- !u!1 &7966388593320536563
255
255
  GameObject:
256
256
  m_ObjectHideFlags: 0
@@ -284,10 +284,10 @@ RectTransform:
284
284
  m_Father: {fileID: 7445445916596797054}
285
285
  m_RootOrder: 0
286
286
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
287
- m_AnchorMin: {x: 0, y: 0}
288
- m_AnchorMax: {x: 0, y: 0}
289
- m_AnchoredPosition: {x: 0, y: 0}
290
- m_SizeDelta: {x: 0, y: 0}
287
+ m_AnchorMin: {x: 0, y: 1}
288
+ m_AnchorMax: {x: 0, y: 1}
289
+ m_AnchoredPosition: {x: 210, y: -50}
290
+ m_SizeDelta: {x: 330, y: 60}
291
291
  m_Pivot: {x: 0.5, y: 0.5}
292
292
  --- !u!222 &6511217540227465427
293
293
  CanvasRenderer:
@@ -318,7 +318,7 @@ MonoBehaviour:
318
318
  m_Calls: []
319
319
  m_FontData:
320
320
  m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
321
- m_FontSize: 16
321
+ m_FontSize: 20
322
322
  m_FontStyle: 0
323
323
  m_BestFit: 0
324
324
  m_MinSize: 0
@@ -2,6 +2,9 @@
2
2
 
3
3
  namespace TapSDK.Core.Internal {
4
4
  public interface ITapEventPlatform {
5
+
6
+ void Init(TapTapEventOptions eventOptions);
7
+
5
8
  void SetUserID(string userID);
6
9
 
7
10
  void SetUserID(string userID, string properties);
@@ -41,7 +41,7 @@ namespace TapSDK.Core.Internal.Utils
41
41
  if (!Application.isPlaying)
42
42
  return;
43
43
  initialized = true;
44
- var g = new GameObject("Loom");
44
+ var g = new GameObject("TapLoom");
45
45
  DontDestroyOnLoad(g);
46
46
  _current = g.AddComponent<TapLoom>();
47
47
  }
@@ -18,7 +18,13 @@ namespace TapSDK.Core {
18
18
  }
19
19
  }
20
20
 
21
- public static void SetUserID(string userID){
21
+ internal static void Init(TapTapEventOptions eventOptions)
22
+ {
23
+ platformWrapper.Init(eventOptions);
24
+ }
25
+
26
+ public static void SetUserID(string userID)
27
+ {
22
28
  platformWrapper?.SetUserID(userID);
23
29
  }
24
30
 
@@ -12,11 +12,12 @@ using System.ComponentModel;
12
12
 
13
13
  namespace TapSDK.Core {
14
14
  public class TapTapSDK {
15
- public static readonly string Version = "4.6.2";
15
+ public static readonly string Version = "4.6.3";
16
16
 
17
17
  public static string SDKPlatform = "TapSDK-Unity";
18
18
 
19
19
  public static TapTapSdkOptions taptapSdkOptions;
20
+
20
21
  private static ITapCorePlatform platformWrapper;
21
22
 
22
23
  private static bool disableDurationStatistics;
@@ -33,60 +34,99 @@ namespace TapSDK.Core {
33
34
  "TapSDK.Core") as ITapCorePlatform;
34
35
  }
35
36
 
36
- public static void Init(TapTapSdkOptions coreOption) {
37
+ public static void Init(TapTapSdkOptions coreOption)
38
+ {
37
39
  if (coreOption == null)
38
40
  throw new ArgumentException("[TapSDK] options is null!");
39
41
  TapTapSDK.taptapSdkOptions = coreOption;
40
42
  TapLog.Enabled = coreOption.enableLog;
41
43
  platformWrapper?.Init(coreOption);
42
- // 初始化各个模块
43
-
44
+ // 初始化各个模块
45
+
44
46
  Type[] initTaskTypes = GetInitTypeList();
45
- if (initTaskTypes != null) {
47
+ if (initTaskTypes != null)
48
+ {
46
49
  List<IInitTask> initTasks = new List<IInitTask>();
47
- foreach (Type initTaskType in initTaskTypes) {
50
+ foreach (Type initTaskType in initTaskTypes)
51
+ {
48
52
  initTasks.Add(Activator.CreateInstance(initTaskType) as IInitTask);
49
53
  }
50
54
  initTasks = initTasks.OrderBy(task => task.Order).ToList();
51
- foreach (IInitTask task in initTasks) {
55
+ foreach (IInitTask task in initTasks)
56
+ {
52
57
  TapLogger.Debug($"Init: {task.GetType().Name}");
53
58
  task.Init(coreOption);
54
59
  }
55
60
  }
61
+ TapTapEvent.Init(HandleEventOptions(coreOption));
62
+
56
63
  }
57
64
 
58
- public static void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions){
65
+ public static void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions)
66
+ {
59
67
  if (coreOption == null)
60
68
  throw new ArgumentException("[TapSDK] options is null!");
61
- long startTime = DateTime.Now.Ticks;
69
+
62
70
  TapTapSDK.taptapSdkOptions = coreOption;
63
71
  TapLog.Enabled = coreOption.enableLog;
64
- long startCore = DateTime.Now.Ticks;
65
- platformWrapper?.Init(coreOption,otherOptions);
66
- long costCore = DateTime.Now.Ticks - startCore;
67
- // TapLog.Log($"Init core cost time: {costCore / 10000}ms");
72
+ platformWrapper?.Init(coreOption, otherOptions);
73
+
68
74
 
69
75
  Type[] initTaskTypes = GetInitTypeList();
70
- if (initTaskTypes != null) {
76
+ if (initTaskTypes != null)
77
+ {
71
78
  List<IInitTask> initTasks = new List<IInitTask>();
72
- foreach (Type initTaskType in initTaskTypes) {
79
+ foreach (Type initTaskType in initTaskTypes)
80
+ {
73
81
  initTasks.Add(Activator.CreateInstance(initTaskType) as IInitTask);
74
82
  }
75
83
  initTasks = initTasks.OrderBy(task => task.Order).ToList();
76
- foreach (IInitTask task in initTasks) {
84
+ foreach (IInitTask task in initTasks)
85
+ {
77
86
  TapLog.Log($"Init: {task.GetType().Name}");
78
- long startModule = DateTime.Now.Ticks;
79
- task.Init(coreOption,otherOptions);
80
- long costModule = DateTime.Now.Ticks - startModule;
81
- // TapLog.Log($"Init {task.GetType().Name} cost time: {costModule / 10000}ms");
87
+ task.Init(coreOption, otherOptions);
82
88
  }
83
89
  }
84
- long costTime = DateTime.Now.Ticks - startTime;
85
- // TapLog.Log($"Init cost time: {costTime / 10000}ms");
90
+ TapTapEvent.Init(HandleEventOptions(coreOption, otherOptions));
91
+ }
92
+
93
+ /// <summary>
94
+ /// 通过初始化属性设置 TapEvent 属性,兼容旧版本
95
+ /// </summary>
96
+ /// <param name="coreOption"></param>
97
+ /// <param name="otherOptions"></param>
98
+ /// <returns>TapEvent 属性</returns>
99
+ private static TapTapEventOptions HandleEventOptions(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions = null)
100
+ {
101
+ TapTapEventOptions tapEventOptions = null;
102
+ if (otherOptions != null && otherOptions.Length > 0)
103
+ {
104
+ foreach (TapTapSdkBaseOptions otherOption in otherOptions)
105
+ {
106
+ if (otherOption is TapTapEventOptions option)
107
+ {
108
+ tapEventOptions = option;
109
+ }
110
+ }
111
+ }
112
+ if (tapEventOptions == null)
113
+ {
114
+ tapEventOptions = new TapTapEventOptions();
115
+ if (coreOption != null)
116
+ {
117
+ tapEventOptions.channel = coreOption.channel;
118
+ tapEventOptions.disableAutoLogDeviceLogin = coreOption.disableAutoLogDeviceLogin;
119
+ tapEventOptions.enableAutoIAPEvent = coreOption.enableAutoIAPEvent;
120
+ tapEventOptions.overrideBuiltInParameters = coreOption.overrideBuiltInParameters;
121
+ tapEventOptions.propertiesJson = coreOption.propertiesJson;
122
+ }
123
+ }
124
+ return tapEventOptions;
86
125
  }
87
126
 
88
127
  // UpdateLanguage 方法
89
- public static void UpdateLanguage(TapTapLanguageType language){
128
+ public static void UpdateLanguage(TapTapLanguageType language)
129
+ {
90
130
  platformWrapper?.UpdateLanguage(language);
91
131
  }
92
132
 
@@ -1,5 +1,6 @@
1
1
  using UnityEngine;
2
2
  using Newtonsoft.Json;
3
+ using System;
3
4
 
4
5
  namespace TapSDK.Core
5
6
  {
@@ -59,6 +60,7 @@ namespace TapSDK.Core
59
60
  /// <summary>
60
61
  /// 渠道,如 AppStore、GooglePlay
61
62
  /// </summary>
63
+ [Obsolete("该属性已废弃,请在 TapTapEventOptions 设置对应属性")]
62
64
  public string channel = null;
63
65
  /// <summary>
64
66
  /// 游戏版本号,如果不传则默认读取应用的版本号
@@ -67,6 +69,7 @@ namespace TapSDK.Core
67
69
  /// <summary>
68
70
  /// 初始化时传入的自定义参数,会在初始化时上报到 device_login 事件
69
71
  /// </summary>
72
+ [Obsolete("该属性已废弃,请在 TapTapEventOptions 设置对应属性")]
70
73
  public string propertiesJson = null;
71
74
  /// <summary>
72
75
  /// CAID,仅国内 iOS
@@ -75,6 +78,7 @@ namespace TapSDK.Core
75
78
  /// <summary>
76
79
  /// 是否能够覆盖内置参数,默认为 false
77
80
  /// </summary>
81
+ [Obsolete("该属性已废弃,请在 TapTapEventOptions 设置对应属性")]
78
82
  public bool overrideBuiltInParameters = false;
79
83
  /// <summary>
80
84
  /// 是否开启广告商 ID 收集,默认为 false
@@ -83,6 +87,7 @@ namespace TapSDK.Core
83
87
  /// <summary>
84
88
  /// 是否开启自动上报 IAP 事件
85
89
  /// </summary>
90
+ [Obsolete("该属性已废弃,请在 TapTapEventOptions 设置对应属性")]
86
91
  public bool enableAutoIAPEvent = true;
87
92
  /// <summary>
88
93
  /// OAID证书, 仅 Android,用于上报 OAID 仅 [TapTapRegion.CN] 生效
@@ -101,13 +106,14 @@ namespace TapSDK.Core
101
106
  /// <summary>
102
107
  /// 是否即用禁用自动上报设备登录事件
103
108
  /// </summary>
109
+ [Obsolete("该属性已废弃,请在 TapTapEventOptions 设置对应属性")]
104
110
  public bool disableAutoLogDeviceLogin = false;
105
111
 
106
112
  /// <summary>
107
113
  /// 屏幕方向:0-竖屏 1-横屏
108
114
  /// </summary>
109
115
  public int screenOrientation = 0;
110
-
116
+
111
117
  [JsonProperty("moduleName")]
112
118
  private string _moduleName = "TapTapSDKCore";
113
119
  [JsonIgnore]
@@ -116,4 +122,46 @@ namespace TapSDK.Core
116
122
  get => _moduleName;
117
123
  }
118
124
  }
125
+
126
+ public class TapTapEventOptions : TapTapSdkBaseOptions
127
+ {
128
+
129
+ /// <summary>
130
+ /// 是否启用 TapTap Event
131
+ /// </summary>
132
+ public bool enableTapTapEvent = true;
133
+
134
+ /// <summary>
135
+ /// 渠道,如 AppStore、GooglePlay
136
+ /// </summary>
137
+ public string channel = null;
138
+
139
+ /// <summary>
140
+ /// 初始化时传入的自定义参数,会在初始化时上报到 device_login 事件
141
+ /// </summary>
142
+ public string propertiesJson = null;
143
+
144
+ /// <summary>
145
+ /// 是否能够覆盖内置参数,默认为 false
146
+ /// </summary>
147
+ public bool overrideBuiltInParameters = false;
148
+
149
+ /// <summary>
150
+ /// 是否开启自动上报 IAP 事件
151
+ /// </summary>
152
+ public bool enableAutoIAPEvent = true;
153
+
154
+ /// <summary>
155
+ /// 是否即用禁用自动上报设备登录事件
156
+ /// </summary>
157
+ public bool disableAutoLogDeviceLogin = false;
158
+
159
+ [JsonProperty("moduleName")]
160
+ private string _moduleName = "TapTapEvent";
161
+ [JsonIgnore]
162
+ public string moduleName
163
+ {
164
+ get => _moduleName;
165
+ }
166
+ }
119
167
  }
@@ -46,7 +46,7 @@ namespace TapSDK.Core.Standalone.Internal {
46
46
  Dictionary<string, object> props = new Dictionary<string, object> {
47
47
  { "duration", duration }
48
48
  };
49
- TapCoreStandalone.Tracker.TrackEvent("play_game", props, true);
49
+ TapEventStandalone.Tracker?.TrackEvent("play_game", props, true);
50
50
  }
51
51
  }
52
52
  }