com.amanotes.gdk 0.2.10 → 0.2.11

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,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.11 - 2023-06-29]
4
+ ### SetLogCondition with EventParam
5
+ ### Rename Migrated -> HasMigrated
6
+ ### Fix StopShowAd
7
+
3
8
  ## [0.2.10 - 2023-06-23]
4
9
  ### Extra package: Project Panel
5
10
  ### Remote config: Allow user to enable / disable automatic default valuye updating (in play mode)
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -416,6 +416,11 @@ namespace Amanotes.Core.Internal
416
416
  {
417
417
  Log($"[Ad] {adType} StopShowAd");
418
418
  _showState = ShowAdsState.None;
419
+ if (_loadState == LoadAdsState.Ready && !isAdReady)
420
+ {
421
+ _loadState = LoadAdsState.None;
422
+ StartLoadAd();
423
+ }
419
424
  RestoreVolume();
420
425
  if (_showAdRoutine == null) return;
421
426
  _instance.StopCoroutine(_showAdRoutine);
@@ -29,13 +29,13 @@ namespace Amanotes.Core
29
29
  //PUBLIC APIS
30
30
  public static partial class Analytics
31
31
  {
32
- public static bool Migrated => localData.migrationLog.count > 0;
32
+ public static bool HasMigrated => localData.migrationLog.count > 0;
33
33
 
34
34
  public interface IEventParamsBuilder { }
35
35
 
36
36
  public class EventParams : IEventParamsBuilder
37
37
  {
38
- public string eventName;
38
+ public readonly string eventName;
39
39
  public Dictionary<string, object> parameters = new Dictionary<string, object>();
40
40
  public string funnelSignature;
41
41
  public bool accumulated;
@@ -45,6 +45,8 @@ namespace Amanotes.Core
45
45
  public HashSet<string> ignoreAdapterIds = new HashSet<string>();
46
46
  public HashSet<string> allowAdapterIds = new HashSet<string>();
47
47
 
48
+ public EventDetail EventDetail => localData.GetEventDetail(eventName, true);
49
+
48
50
  public EventParams(string eventName)
49
51
  {
50
52
  this.eventName = eventName;
@@ -126,7 +128,7 @@ namespace Amanotes.Core
126
128
  return eventDetail != null ? (withinSession ? eventDetail.countInSession : eventDetail.totalCount) : 0;
127
129
  }
128
130
 
129
- public static void SetLogEventCondition(Predicate<EventDetail> condition)
131
+ public static void SetLogEventCondition(Predicate<EventParams> condition)
130
132
  {
131
133
  if (logEventHook != null) LogWarning("LogEventCondition has already set! Please make sure to call it once.");
132
134
  logEventHook = condition;
@@ -281,7 +283,7 @@ namespace Amanotes.Core
281
283
  }
282
284
 
283
285
  internal static readonly Dictionary<string, EventConfig> sendAtCount = new Dictionary<string, EventConfig>();
284
- internal static Predicate<EventDetail> logEventHook = null;
286
+ internal static Predicate<EventParams> logEventHook = null;
285
287
  internal static readonly Queue<EventParams> eventQueue = new Queue<EventParams>();
286
288
  internal static readonly List<AdapterContext> listAdapters = new List<AdapterContext>();
287
289
  internal static readonly AnalyticsData localData = new AnalyticsData().LoadJsonFromFile();
@@ -317,7 +319,7 @@ namespace Amanotes.Core
317
319
  string eventNameToSend = GetEventNameToSend(eventData.eventName, countInSession, totalCount);
318
320
  if (Config.common.normalizeEventName) NormalizeEventName(ref eventNameToSend);
319
321
 
320
- if (showAnalyticsLog) Debug.Log($"AmaGDK v{AmaGDK.VERSION} | Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n{JsonUtils.DictionaryToJson(eventData.parameters, true)}");
322
+ if (showAnalyticsLog) Debug.Log($"AmaGDK | Event <{eventNameToSend}> (in session: {countInSession}, total: {totalCount})\n{JsonUtils.DictionaryToJson(eventData.parameters, true)}");
321
323
 
322
324
  var inUseAdapterIDs = new List<string>();
323
325
  foreach (AdapterContext m in listAdapters)
@@ -406,7 +408,7 @@ namespace Amanotes.Core
406
408
  if (logEventHook != null)
407
409
  {
408
410
  EventDetail eventDetail = localData.GetEventDetail(eventData.eventName, true);
409
- return logEventHook(eventDetail);
411
+ return logEventHook(eventData);
410
412
  }
411
413
 
412
414
  return true;
package/Runtime/AmaGDK.cs CHANGED
@@ -10,7 +10,7 @@ namespace Amanotes.Core
10
10
  {
11
11
  public partial class AmaGDK : MonoBehaviour
12
12
  {
13
- public const string VERSION = "0.2.10";
13
+ public const string VERSION = "0.2.11";
14
14
 
15
15
  internal static AmaGDK _instance;
16
16
  internal static Status _status = Status.None;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",