com.amanotes.gdk 0.2.41 → 0.2.42

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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.42 - 2023-11-28]
4
+ - [Fix] AdShowNotReady only trigger for 3 type of status
5
+ - [Fix] WaitForSeconds can not be shared between different routines
6
+
3
7
  ## [0.2.41 - 2023-11-28]
4
8
  - Add more state callbacks for AdShowReadyStatus
5
9
  - Fix not wait for RewardCancel event (not exist any more)
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -452,8 +452,6 @@ namespace Amanotes.Core.Internal
452
452
 
453
453
  public abstract class AdLogic
454
454
  {
455
- private static readonly WaitForSecondsRealtime wait1Sec = new WaitForSecondsRealtime(1f);
456
-
457
455
  internal LoadAdsState _loadState = LoadAdsState.None;
458
456
  internal bool hasAd
459
457
  {
@@ -506,6 +504,7 @@ namespace Amanotes.Core.Internal
506
504
  yield break;
507
505
  }
508
506
 
507
+ var wait1Sec = new WaitForSecondsRealtime(1f);
509
508
  Log("[Ad] LoadAdRoutine start(): isAdReady = " + isAdReady);
510
509
  while (true)
511
510
  {
@@ -654,6 +653,7 @@ namespace Amanotes.Core.Internal
654
653
  bool? hasInternet = null;
655
654
  _instance.StartCoroutine(WebUtils.CheckInternet(result => hasInternet = result));
656
655
 
656
+ var wait1Sec = new WaitForSecondsRealtime(1f);
657
657
  while (counter < timeout || timeout == -1)
658
658
  {
659
659
  yield return wait1Sec;
@@ -875,22 +875,21 @@ namespace Amanotes.Core.Internal
875
875
 
876
876
  protected void OnAdShowReadyStatus(bool isReady, AdShowReadyStatus status)
877
877
  {
878
- if (Ads.context != null)
878
+ if (Ads.context == null)
879
879
  {
880
+ LogWarning("[Ad] OnAdOpen() Something wrong - No AdContext");
881
+ return;
882
+ }
883
+
880
884
  Ads.context.adCallback |= AdCallback.ShowReadyStatus;
881
- if (!isReady)
882
- {
883
885
  Ads.context.onAdShowReadyStatus?.Invoke(status);
884
- OnAdShowNotReady(status);
885
- } else
886
+ if (status == AdShowReadyStatus.Ready)
886
887
  {
887
- Ads.context.onAdShowReadyStatus?.Invoke(AdShowReadyStatus.Ready);
888
888
  OnAdShowReady();
889
889
  }
890
- }
891
- else
890
+ else if (status == AdShowReadyStatus.NoInternet || status == AdShowReadyStatus.TimeOut || status == AdShowReadyStatus.Wifi3GDisabled)
892
891
  {
893
- LogWarning("[Ad] OnAdOpen() Something wrong - No AdContext");
892
+ OnAdShowNotReady(status);
894
893
  }
895
894
  }
896
895
 
package/Runtime/AmaGDK.cs CHANGED
@@ -15,7 +15,7 @@ namespace Amanotes.Core
15
15
  {
16
16
  public partial class AmaGDK : MonoBehaviour
17
17
  {
18
- public const string VERSION = "0.2.41";
18
+ public const string VERSION = "0.2.42";
19
19
 
20
20
  internal static AmaGDK _instance;
21
21
  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.41",
3
+ "version": "0.2.42",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",