com.amanotes.gdk 0.1.3 → 0.1.5

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,6 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## [0.1.3] - 2023-02-09
4
- ### Release AmaGDK 0.1.3
3
+ ## [0.1.5 - 2023-02-13]
4
+ ### Release AmaSDK v0.1.5
5
+
6
+ ## [0.1.4 - 2023-02-13]
7
+ ### Release AmaSDK v0.1.4
8
+
9
+ ## [0.1.3 - 2023-02-10]
10
+ ### Release AmaSDK v0.1.3
11
+
12
+ ## [0.1.2] - 2023-02-08
13
+ ### Release AmaGDK 0.1.2
5
14
  ### FirebaseAnalytics adapter compatible with FirebaseAnalytics SDK v9
6
15
  ### Appsflyer adapter compatible with Appsflyer SDK v6
Binary file
@@ -385,6 +385,7 @@ namespace Amanotes.Core
385
385
  public static IEventParamsBuilder Except(this IEventParamsBuilder ap, params string[] analyticIds)
386
386
  {
387
387
  if (ap == null) return null;
388
+ if (analyticIds.Length == 0) return ap;
388
389
 
389
390
  EventParams eventData = ap as EventParams;
390
391
  foreach (var mId in analyticIds)
@@ -397,6 +398,7 @@ namespace Amanotes.Core
397
398
  public static IEventParamsBuilder OnlyTo(this IEventParamsBuilder ap, params string[] analyticIds)
398
399
  {
399
400
  if (ap == null) return null;
401
+ if (analyticIds.Length == 0) return ap;
400
402
 
401
403
  EventParams eventData = ap as EventParams;
402
404
  foreach (var mId in analyticIds)
@@ -409,6 +411,7 @@ namespace Amanotes.Core
409
411
  public static IEventParamsBuilder AddParam(this IEventParamsBuilder ap, string key, object value)
410
412
  {
411
413
  if (ap == null) return null;
414
+ if (!IsValidKeyValue(ap, key, value)) return ap;
412
415
 
413
416
  var parameters = (ap as EventParams).parameters;
414
417
  if (parameters.ContainsKey(key))
@@ -424,14 +427,37 @@ namespace Amanotes.Core
424
427
  public static IEventParamsBuilder AddParam(this IEventParamsBuilder ap, Dictionary<string, object> dictParams)
425
428
  {
426
429
  if (ap == null) return null;
430
+ if (dictParams == null)
431
+ {
432
+ LogWarning($"Param dictionary is null. Event name: {(ap as EventParams).eventName}!");
433
+ return ap;
434
+ }
427
435
 
428
436
  foreach (var kvp in dictParams)
429
437
  {
430
- ap.AddParam(kvp.Key, kvp.Value);
438
+ if (IsValidKeyValue(ap, kvp.Key, kvp.Value))
439
+ ap.AddParam(kvp.Key, kvp.Value);
431
440
  }
432
441
  return ap;
433
442
  }
434
443
 
444
+ static bool IsValidKeyValue(IEventParamsBuilder ap, string key, object value)
445
+ {
446
+ string eventName = (ap as EventParams).eventName;
447
+ if (string.IsNullOrWhiteSpace(key))
448
+ {
449
+ LogWarning($"Param key is empty. Event name: {eventName}!");
450
+ return false;
451
+ }
452
+ if (value == null)
453
+ {
454
+ LogWarning($"Param value is null. Event name: {eventName}!");
455
+ return false;
456
+ }
457
+
458
+ return true;
459
+ }
460
+
435
461
  }
436
462
  }
437
463
 
@@ -32,7 +32,7 @@ namespace Amanotes.Core.Internal
32
32
  #endif
33
33
 
34
34
  public const string PACKAGE_PATH = BASE_PATH + "Packages/";
35
- public const string AMAGDK_PREFAB = BASE_PATH + "AmaGDK.prefab";
35
+ public const string AMAGDK_PREFAB = BASE_PATH + "Runtime/AmaGDK.prefab";
36
36
  public const string AMAGDK_CONFIG_PACKAGE = PACKAGE_PATH + "AmaGDKConfig.unitypackage";
37
37
 
38
38
  public static readonly string[] AMAGDK_ADAPTERS = new string[]
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.3";
15
+ public const string VERSION = "0.1.5";
16
16
 
17
17
  internal static AmaGDK _instance;
18
18
  private static ConfigAsset _config = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",