com.amanotes.gdk 0.2.50 → 0.2.52
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 +11 -0
- package/Editor/Extra/GDKCIBuildCommand.cs +312 -0
- package/Editor/Extra/GDKCIBuildCommand.cs.meta +3 -0
- package/Editor/Extra/{GDKAutoBuild.cs → GDKLocalBuild.cs} +49 -34
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/PostProcessor.unitypackage +0 -0
- package/Extra/{AndroidPostProcessor.unitypackage.meta → PostProcessor.unitypackage.meta} +1 -1
- package/Extra/SDKVersionTracking.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
- package/Packages/IronSourceAdapter.unitypackage +0 -0
- package/Packages/RevenueCatAdapter.unitypackage +0 -0
- package/Runtime/AmaGDK.Adapters.cs +1 -1
- package/Runtime/AmaGDK.Ads.cs +17 -17
- package/Runtime/AmaGDK.Analytics.cs +316 -151
- package/Runtime/AmaGDK.UserProfile.cs +36 -32
- package/Runtime/AmaGDK.cs +2 -2
- package/Runtime/Internal/AmaGDK.Internal.cs +24 -0
- package/Runtime/Internal/AmaGDK.Utils.cs +27 -1
- package/package.json +1 -1
- package/Extra/AndroidPostProcessor.unitypackage +0 -0
- /package/Editor/Extra/{GDKAutoBuild.cs.meta → GDKLocalBuild.cs.meta} +0 -0
package/Runtime/AmaGDK.Ads.cs
CHANGED
|
@@ -196,11 +196,11 @@ namespace Amanotes.Core
|
|
|
196
196
|
// internal use
|
|
197
197
|
internal static readonly AdsData localData = new AdsData().LoadJsonFromFile();
|
|
198
198
|
|
|
199
|
-
internal
|
|
200
|
-
internal
|
|
201
|
-
internal
|
|
202
|
-
internal
|
|
203
|
-
|
|
199
|
+
protected internal static AdShowContext context;
|
|
200
|
+
protected internal static AdAdapter _adapter;
|
|
201
|
+
protected internal static float _savedVolume = -1;
|
|
202
|
+
protected internal static float _savedTimeScale = -1;
|
|
203
|
+
|
|
204
204
|
public static void OnInter_Request(Action callback)
|
|
205
205
|
{
|
|
206
206
|
dispatcher.AddListener(Event.INTER_REQUEST, callback, false);
|
|
@@ -258,8 +258,8 @@ namespace Amanotes.Core
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
public static bool HasInterstitial => _adapter
|
|
262
|
-
public static bool HasRewardedVideo => _adapter
|
|
261
|
+
public static bool HasInterstitial => _adapter?.interstitial.hasAd ?? false;
|
|
262
|
+
public static bool HasRewardedVideo => _adapter?.rewardVideo.hasAd ?? false;
|
|
263
263
|
public static bool IsBannerShowing => _isBannerShowing;
|
|
264
264
|
public static bool IsAdShowing => context != null;
|
|
265
265
|
|
|
@@ -273,6 +273,7 @@ namespace Amanotes.Core
|
|
|
273
273
|
|
|
274
274
|
public static IAdCallback ShowInterstitial(string placementName = null, Dictionary<string, object> userData = null)
|
|
275
275
|
{
|
|
276
|
+
if (_adapter == null) return null;
|
|
276
277
|
if (!ClearPrevContext()) return null;
|
|
277
278
|
|
|
278
279
|
context = new AdShowContext(AdType.Interstitial, placementName, userData);
|
|
@@ -284,6 +285,7 @@ namespace Amanotes.Core
|
|
|
284
285
|
|
|
285
286
|
public static IAdCallback ShowRewardedVideo(string placementName = null, Dictionary<string, object> userData = null)
|
|
286
287
|
{
|
|
288
|
+
if (_adapter == null) return null;
|
|
287
289
|
if (!ClearPrevContext()) return null;
|
|
288
290
|
|
|
289
291
|
context = new AdShowContext(AdType.VideoReward, placementName, userData);
|
|
@@ -303,12 +305,8 @@ namespace Amanotes.Core
|
|
|
303
305
|
_isBannerShowing = true;
|
|
304
306
|
_showingBannerPosition = bannerPosition ?? Config.ad.bannerPosition;
|
|
305
307
|
|
|
306
|
-
if (_adapter == null)
|
|
307
|
-
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
if (_adapter == null) return;
|
|
309
|
+
|
|
312
310
|
dispatcher.Dispatch(Event.BANNER_SHOW);
|
|
313
311
|
_adapter.ShowBanner(_showingBannerPosition);
|
|
314
312
|
}
|
|
@@ -317,11 +315,13 @@ namespace Amanotes.Core
|
|
|
317
315
|
{
|
|
318
316
|
if (!_isBannerShowing) return;
|
|
319
317
|
_isBannerShowing = false;
|
|
318
|
+
if (_adapter == null) return;
|
|
320
319
|
_adapter.HideBanner();
|
|
321
320
|
}
|
|
322
321
|
|
|
323
322
|
public static void StopWaitForAd()
|
|
324
323
|
{
|
|
324
|
+
if (_adapter == null) return;
|
|
325
325
|
if (context == null)
|
|
326
326
|
return;
|
|
327
327
|
|
|
@@ -357,6 +357,7 @@ namespace Amanotes.Core
|
|
|
357
357
|
|
|
358
358
|
public static void SetUserId(string userId)
|
|
359
359
|
{
|
|
360
|
+
if (_adapter == null) return;
|
|
360
361
|
_adapter.SetUserId(userId);
|
|
361
362
|
}
|
|
362
363
|
}
|
|
@@ -397,14 +398,14 @@ namespace Amanotes.Core.Internal
|
|
|
397
398
|
protected AdModuleConfig moduleConfig => Config.ad;
|
|
398
399
|
|
|
399
400
|
// APIs
|
|
400
|
-
internal
|
|
401
|
-
internal
|
|
401
|
+
protected internal abstract AdLogic interstitial { get; }
|
|
402
|
+
protected internal abstract AdLogic rewardVideo { get; }
|
|
402
403
|
|
|
403
404
|
public abstract void ShowBanner(BannerPosition bannerPosition);
|
|
404
405
|
public abstract void HideBanner();
|
|
405
406
|
|
|
406
407
|
// Internally used
|
|
407
|
-
internal
|
|
408
|
+
protected internal abstract void SetUserId(string userId);
|
|
408
409
|
}
|
|
409
410
|
|
|
410
411
|
public interface IAdCallback { }
|
|
@@ -504,7 +505,6 @@ namespace Amanotes.Core.Internal
|
|
|
504
505
|
|
|
505
506
|
public abstract class AdLogic
|
|
506
507
|
{
|
|
507
|
-
internal protected AdAdapter adapter => Ads._adapter;
|
|
508
508
|
protected AdModuleConfig adConfig => Config.ad;
|
|
509
509
|
protected AdShowContext context => Ads.context;
|
|
510
510
|
|