com.amanotes.gdk 0.2.23 → 0.2.25

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.25 - 2023-10-25]
4
+ Update Ads module:
5
+ - OnRewardedAvailable
6
+ - OnRewardedUnavailable
7
+ - OnAdImpression
8
+ - Report internet condition in ShowAdFail
9
+ - Polish display of ironSource config's inspector
10
+ - Move SKAdnetwork's destination to Editor
11
+
3
12
  ## [0.2.23 - 2023-10-18]
4
13
  - Fix UserProfile out of main thread
5
14
  - Handle multiple Firebase's dependency check
@@ -112,14 +112,14 @@ namespace Amanotes.Editor
112
112
  {
113
113
  CreateCachedEditor(configAsset, null, ref editor);
114
114
  float lbWidth = EditorGUIUtility.labelWidth;
115
- EditorGUIUtility.labelWidth = 200f;
115
+ EditorGUIUtility.labelWidth = 220f;
116
116
  editor.OnInspectorGUI();
117
117
  EditorGUIUtility.labelWidth = lbWidth;
118
118
  }
119
119
 
120
120
  private void DrawGUI_ConfigAsset()
121
121
  {
122
- EditorGUILayout.ObjectField(configAsset, configAsset.GetType(), false);
122
+ EditorGUILayout.ObjectField(configAsset, configAsset.GetType(), false, GUILayout.Width(EditorGUIUtility.currentViewWidth - 414), GUILayout.ExpandWidth(true));
123
123
  }
124
124
 
125
125
  private void UpdateListAdapter()
@@ -142,7 +142,7 @@ namespace Amanotes.Core
142
142
 
143
143
  private static string GetSDKName(string packageName)
144
144
  {
145
- return sdkToClassMap.Keys.FirstOrDefault(sdk => packageName.Contains(sdk));
145
+ return sdkToClassMap.Keys.FirstOrDefault(sdk => packageName.Contains(sdk)) ?? "";
146
146
  }
147
147
  }
148
148
  }
@@ -63,9 +63,12 @@ namespace Amanotes.Editor
63
63
 
64
64
  public static bool Toggle(string label, ref bool value)
65
65
  {
66
+ float lbWidth = EditorGUIUtility.labelWidth;
67
+ EditorGUIUtility.labelWidth = 220f;
66
68
  bool newValue = EditorGUILayout.Toggle(label, value);
69
+ EditorGUIUtility.labelWidth = lbWidth;
70
+
67
71
  if (newValue == value) return false;
68
-
69
72
  value = newValue;
70
73
  return true;
71
74
  }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -64,6 +64,18 @@ namespace Amanotes.Core
64
64
  return ad;
65
65
  }
66
66
 
67
+ public static IAdCallback OnRewardedVideoComplete(this IAdCallback ad, Action<bool> callback)
68
+ {
69
+ if (ad == null)
70
+ return null;
71
+ void RewardedVideoComplete()
72
+ {
73
+ callback(Ads.context.hasReward);
74
+ }
75
+ Ads.context.onClosed -= RewardedVideoComplete;
76
+ Ads.context.onClosed += RewardedVideoComplete;
77
+ return ad;
78
+ }
67
79
  }
68
80
 
69
81
  public partial class AmaGDK // Ads module
@@ -306,6 +318,7 @@ namespace Amanotes.Core.Internal
306
318
  {
307
319
  public readonly AdType adType;
308
320
  public readonly string placementName;
321
+ public string errorMessage;
309
322
  public readonly Dictionary<string, object> userData;
310
323
  public AdCallback adCallback;
311
324
 
@@ -473,6 +486,9 @@ namespace Amanotes.Core.Internal
473
486
  if (Ads._adConfig.checkInternet && !hasInternet)
474
487
  {
475
488
  _showState = ShowAdsState.ShowFail;
489
+ Ads.context.errorMessage = "Please check you internet connection";
490
+ if (_isInterstitial) Ads.Events.OnInterstitialShowFailed?.Invoke();
491
+ else Ads.Events.OnRewardedShowFailed?.Invoke();
476
492
  ShowAdRoutineCompleted(false);
477
493
  yield break;
478
494
  }
@@ -734,6 +750,8 @@ namespace Amanotes.Core.Internal
734
750
 
735
751
  public class AdListener
736
752
  {
753
+ public Action OnRewardedAvailable;
754
+ public Action OnRewardedUnavailable;
737
755
  public Action OnRewardedOpened;
738
756
  public Action OnRewardedReceived;
739
757
  public Action OnRewardedClicked;
@@ -749,5 +767,6 @@ namespace Amanotes.Core.Internal
749
767
  public Action<string> OnInterstitialLoadFailed;
750
768
 
751
769
  public Action OnShowTimeout;
770
+ public Action<object> OnAdImpression;
752
771
  }
753
772
  }
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.23";
17
+ public const string VERSION = "0.2.25";
18
18
 
19
19
  internal static AmaGDK _instance;
20
20
  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.23",
3
+ "version": "0.2.25",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",