com.amanotes.gdk 0.1.16 → 0.1.18

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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.18 - 2023-03-27]
4
+ ### Fix AmaGDK's autoInit saving issue
5
+
6
+ ## [0.1.17 - 2023-03-13]
7
+ ### Release AmaGDK v0.1.17
8
+ ### Rename Analytics APIs
9
+
3
10
  ## [0.1.16 - 2023-03-10]
4
11
  ### Release AmaGDK v0.1.16
5
12
  ### SemVer supports 4 parts
6
- ### Analytics supports event config
13
+ ### Analytics supports EventConfig
7
14
 
8
15
  ## [0.1.15 - 2023-03-06]
9
16
  ### Release AmaGDK v0.1.15
@@ -81,6 +81,7 @@ namespace Amanotes.Editor
81
81
  if (sdk.autoInit)
82
82
  {
83
83
  Toggle("Auto Init", ref sdk.autoInit);
84
+ EditorUtility.SetDirty(sdk);
84
85
  return;
85
86
  }
86
87
 
Binary file
Binary file
@@ -54,7 +54,7 @@ namespace Amanotes.Core
54
54
  get { return !string.IsNullOrEmpty(funnelSignature); }
55
55
  }
56
56
 
57
- public bool IsForbiddenByAdapterConfig(string adapterId)
57
+ public bool IsAdapterForbidden(string adapterId)
58
58
  {
59
59
  if (ignoreAdapterIds.Count > 0)
60
60
  {
@@ -70,12 +70,12 @@ namespace Amanotes.Core
70
70
  return false;
71
71
  }
72
72
 
73
- public bool IsForbiddenByLogAtCountConfig()
73
+ public bool IsSkippedBySendAtCountConfig()
74
74
  {
75
- if (!logAtCount.TryGetValue(eventName, out var logAtCountConfig)) return false;
75
+ if (!sendAtCount.TryGetValue(eventName, out var sendAtCountConfig)) return false;
76
76
 
77
- int accumulatedCount = GetAccumulatedCount(eventName, logAtCountConfig.withinSession);
78
- return !logAtCountConfig.listCount.Contains(accumulatedCount);
77
+ int accumulatedCount = GetAccumulatedCount(eventName, sendAtCountConfig.withinSession);
78
+ return sendAtCountConfig.listCount == null ? false : !sendAtCountConfig.listCount.Contains(accumulatedCount);
79
79
  }
80
80
  }
81
81
 
@@ -226,25 +226,25 @@ namespace Amanotes.Core
226
226
  localData.UpdateMigrationLog();
227
227
  }
228
228
 
229
- public static void SetPermittedEvents(List<string> eventNames, params string[] adapterIDs)
229
+ public static void OnlyAllowEvents(List<string> eventNames, params string[] adapterIDs)
230
230
  {
231
231
  foreach (var adapterID in adapterIDs)
232
232
  {
233
233
  var adapter = listAdapters.Find(a => a.id == adapterID)?.GetAdapterApi<IAnalyticAdapter>();
234
- adapter?.SetPermittedEvents(eventNames);
234
+ adapter?.OnlyAllowEvents(eventNames);
235
235
  }
236
236
  }
237
237
 
238
- public static void SetForbiddenEvents(List<string> eventNames, params string[] adapterIDs)
238
+ public static void OnlyBanEvents(List<string> eventNames, params string[] adapterIDs)
239
239
  {
240
240
  foreach (var adapterID in adapterIDs)
241
241
  {
242
242
  var adapter = listAdapters.Find(a => a.id == adapterID)?.GetAdapterApi<IAnalyticAdapter>();
243
- adapter?.SetForbiddenEvents(eventNames);
243
+ adapter?.OnlyBanEvents(eventNames);
244
244
  }
245
245
  }
246
246
 
247
- public static void SetLogAtCount(string eventName, List<int> listCount, bool withinSession = false, bool appendCountToEventName = false, string numberFormat = "00")
247
+ public static void OnlySendAtCount(string eventName, List<int> listCount, bool withinSession = false, bool appendCountToEventName = false, string numberFormat = "00")
248
248
  {
249
249
  var config = new EventConfig
250
250
  {
@@ -254,14 +254,14 @@ namespace Amanotes.Core
254
254
  numberFormat = numberFormat
255
255
  };
256
256
 
257
- if (logAtCount.ContainsKey(eventName))
257
+ if (sendAtCount.ContainsKey(eventName))
258
258
  {
259
259
  LogWarning($"{eventName} has already been set list of count number to log.");
260
- logAtCount[eventName] = config;
260
+ sendAtCount[eventName] = config;
261
261
  }
262
262
  else
263
263
  {
264
- logAtCount.Add(eventName, config);
264
+ sendAtCount.Add(eventName, config);
265
265
  }
266
266
  }
267
267
  }
@@ -277,7 +277,7 @@ namespace Amanotes.Core
277
277
  public string numberFormat;
278
278
  }
279
279
 
280
- internal static readonly Dictionary<string, EventConfig> logAtCount = new Dictionary<string, EventConfig>();
280
+ internal static readonly Dictionary<string, EventConfig> sendAtCount = new Dictionary<string, EventConfig>();
281
281
  internal static Predicate<EventDetail> logEventHook = null;
282
282
  internal static readonly Queue<EventParams> eventQueue = new Queue<EventParams>();
283
283
  internal static readonly List<AdapterInfo> listAdapters = new List<AdapterInfo>();
@@ -325,7 +325,7 @@ namespace Amanotes.Core
325
325
 
326
326
  internal static string GetEventNameToSend(string eventName, int countInSession, int totalCount)
327
327
  {
328
- if (!logAtCount.TryGetValue(eventName, out var config)) return eventName;
328
+ if (!sendAtCount.TryGetValue(eventName, out var config)) return eventName;
329
329
  if (!config.appendCountToEventName) return eventName;
330
330
 
331
331
  return $"{eventName}_{(config.withinSession ? countInSession : totalCount).ToString(config.numberFormat)}";
@@ -367,7 +367,7 @@ namespace Amanotes.Core
367
367
  }
368
368
 
369
369
  //Check predefined event count config
370
- if (eventData.IsForbiddenByLogAtCountConfig())
370
+ if (eventData.IsSkippedBySendAtCountConfig())
371
371
  {
372
372
  return false;
373
373
  }
@@ -657,8 +657,8 @@ namespace Amanotes.Core.Internal
657
657
 
658
658
  void SetUserProperty(string key, string value);
659
659
 
660
- void SetPermittedEvents(List<string> eventNames);
660
+ void OnlyAllowEvents(List<string> eventNames);
661
661
 
662
- void SetForbiddenEvents(List<string> eventNames);
662
+ void OnlyBanEvents(List<string> eventNames);
663
663
  }
664
664
  }
package/Runtime/AmaGDK.cs CHANGED
@@ -12,7 +12,7 @@ namespace Amanotes.Core
12
12
  {
13
13
  public partial class AmaGDK : MonoBehaviour
14
14
  {
15
- public const string VERSION = "0.1.16";
15
+ public const string VERSION = "0.1.18";
16
16
 
17
17
  internal static AmaGDK _instance;
18
18
  internal static event Action _frameUpdate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",