com.amanotes.gdk 0.2.26 → 0.2.27
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 +4 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AmaGDKProject.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/IronSourceAdapter_v7.2.6.unitypackage +0 -0
- package/Packages/RevenueCatAdapter_v6.0.0.unitypackage +0 -0
- package/Runtime/AmaGDK.Ads.cs +46 -22
- package/Runtime/AmaGDK.cs +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/Runtime/AmaGDK.Ads.cs
CHANGED
|
@@ -159,24 +159,26 @@ namespace Amanotes.Core
|
|
|
159
159
|
{
|
|
160
160
|
if (context == null) return true;
|
|
161
161
|
float duration = Time.realtimeSinceStartup - context.showCallAt;
|
|
162
|
-
bool willSkip = duration < Mathf.Max(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
{
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
162
|
+
// bool willSkip = duration < Mathf.Max(60f, _adConfig.adShowTimeoutInSecs);
|
|
163
|
+
LogWarning($"[AD] ShowRequest IGNORED as another ad is showing (elapsedTime: {duration:n2}s):\n" + JsonUtility.ToJson(context, true));
|
|
164
|
+
return false;
|
|
165
|
+
|
|
166
|
+
// if (willSkip)
|
|
167
|
+
// {
|
|
168
|
+
// LogWarning($"[AD] ShowRequest IGNORED as another ad is showing (elapsedTime: {duration:n2}s):\n" + JsonUtility.ToJson(context, true));
|
|
169
|
+
// return false;
|
|
170
|
+
// }
|
|
171
|
+
//
|
|
172
|
+
// LogWarning($"[AD] FORCE STOPPED the previous ad, as it seems to hang (elapsedTime: {duration:n2}s):\n" + JsonUtility.ToJson(context, true));
|
|
173
|
+
// // possibly hang: force stop
|
|
174
|
+
// if (context.adType == AdType.Interstitial)
|
|
175
|
+
// {
|
|
176
|
+
// _adapter.interstitial.StopShowAd();
|
|
177
|
+
// } else
|
|
178
|
+
// {
|
|
179
|
+
// _adapter.rewardVideo.StopShowAd();
|
|
180
|
+
// }
|
|
181
|
+
// return true;
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
public static IAdCallback ShowInterstitial(string placementName = null, Dictionary<string, object> userData = null)
|
|
@@ -242,7 +244,7 @@ namespace Amanotes.Core
|
|
|
242
244
|
{
|
|
243
245
|
if (context == null)
|
|
244
246
|
return;
|
|
245
|
-
|
|
247
|
+
|
|
246
248
|
if (context.adType == AdType.Interstitial)
|
|
247
249
|
_adapter.interstitial.StopShowAd();
|
|
248
250
|
else
|
|
@@ -370,7 +372,20 @@ namespace Amanotes.Core.Internal
|
|
|
370
372
|
private static readonly WaitForSeconds wait1Sec = new WaitForSeconds(1f);
|
|
371
373
|
|
|
372
374
|
internal LoadAdsState _loadState = LoadAdsState.None;
|
|
373
|
-
internal bool hasAd
|
|
375
|
+
internal bool hasAd
|
|
376
|
+
{
|
|
377
|
+
get
|
|
378
|
+
{
|
|
379
|
+
if (_loadState == LoadAdsState.Ready && !isAdReady)
|
|
380
|
+
{
|
|
381
|
+
LogWarning("[Ad] Inconsistent Ready state (might caused by poor internet condition)");
|
|
382
|
+
_loadState = LoadAdsState.None;
|
|
383
|
+
StartLoadAd();
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
return _loadState == LoadAdsState.Ready;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
374
389
|
|
|
375
390
|
internal Coroutine _loadRoutine;
|
|
376
391
|
|
|
@@ -499,12 +514,21 @@ namespace Amanotes.Core.Internal
|
|
|
499
514
|
if (_showAdRoutine == null) return;
|
|
500
515
|
_instance.StopCoroutine(_showAdRoutine);
|
|
501
516
|
_showAdRoutine = null;
|
|
517
|
+
|
|
518
|
+
if (Ads.context.adType == AdType.Interstitial)
|
|
519
|
+
{
|
|
520
|
+
ShowAdRoutineCompleted(!Ads.context.hasFailedOrCancelled);
|
|
521
|
+
}
|
|
522
|
+
else
|
|
523
|
+
{
|
|
524
|
+
ShowAdRoutineCompleted(Ads.context.hasReward);
|
|
525
|
+
}
|
|
502
526
|
}
|
|
503
527
|
|
|
504
528
|
IEnumerator ShowAdRoutine()
|
|
505
529
|
{
|
|
506
|
-
// Wait
|
|
507
|
-
yield return
|
|
530
|
+
// Wait to end frame so that all AdCallbacks finish registering
|
|
531
|
+
yield return new WaitForEndOfFrame();
|
|
508
532
|
|
|
509
533
|
// Wait for Ad
|
|
510
534
|
if (!isAdReady)
|
package/Runtime/AmaGDK.cs
CHANGED
|
@@ -14,7 +14,7 @@ namespace Amanotes.Core
|
|
|
14
14
|
{
|
|
15
15
|
public partial class AmaGDK : MonoBehaviour
|
|
16
16
|
{
|
|
17
|
-
public const string VERSION = "0.2.
|
|
17
|
+
public const string VERSION = "0.2.27";
|
|
18
18
|
|
|
19
19
|
internal static AmaGDK _instance;
|
|
20
20
|
internal static Status _status = Status.None;
|
|
@@ -297,6 +297,7 @@ namespace Amanotes.Core
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
UpdateManifest(output);
|
|
300
|
+
Log("AmaGDK changes to dev mode successfully");
|
|
300
301
|
}
|
|
301
302
|
|
|
302
303
|
private string RunShellCommand(string command)
|