com.amanotes.gdk 0.2.10 → 0.2.12
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/AmaGDKEditor.cs +1 -0
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +20 -0
- package/Editor/Utils/AmaGDKEditor.GUI.cs +10 -14
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AmaGDKProject.unitypackage +0 -0
- package/Packages/AdjustAdapter_v4.33.0.unitypackage +0 -0
- package/Packages/AdjustAdapter_v4.33.0.unitypackage.meta +7 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AmaPassport.ATTSupport.unitypackage +0 -0
- package/Packages/AmaPassportAdapter_v1.0.0.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/Runtime/AmaGDK.Ads.cs +5 -0
- package/Runtime/AmaGDK.Analytics.cs +8 -6
- package/Runtime/AmaGDK.Internal.cs +1 -0
- package/Runtime/AmaGDK.cs +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.12 - 2023-07-07]
|
|
4
|
+
### Restructure GDK - symlink GDK source to unity projects
|
|
5
|
+
### Unity 2019 compatible - no null coalescing
|
|
6
|
+
### Remove redundant AmaPassport config field
|
|
7
|
+
### Auto request AmaId
|
|
8
|
+
|
|
9
|
+
## [0.2.11 - 2023-06-29]
|
|
10
|
+
### SetLogCondition with EventParam
|
|
11
|
+
### Rename Migrated -> HasMigrated
|
|
12
|
+
### Fix StopShowAd
|
|
13
|
+
|
|
3
14
|
## [0.2.10 - 2023-06-23]
|
|
4
15
|
### Extra package: Project Panel
|
|
5
16
|
### Remote config: Allow user to enable / disable automatic default valuye updating (in play mode)
|
package/Editor/AmaGDKEditor.cs
CHANGED
|
@@ -101,6 +101,7 @@ namespace Amanotes.Editor
|
|
|
101
101
|
case FIREBASE_ANALYTICS: return FirebaseAnalytics();
|
|
102
102
|
case FIREBASE_REMOTE_CONFIG: return FirebaseRemoteConfig();
|
|
103
103
|
case APPSFLYER: return AppsFlyer();
|
|
104
|
+
case ADJUST: return Adjust();
|
|
104
105
|
case IRONSOURCE: return Ironsource();
|
|
105
106
|
case REVENUECAT: return RevenueCat();
|
|
106
107
|
default:
|
|
@@ -172,6 +173,25 @@ namespace Amanotes.Editor
|
|
|
172
173
|
|
|
173
174
|
return version.Trim();
|
|
174
175
|
}
|
|
176
|
+
|
|
177
|
+
internal static string Adjust()
|
|
178
|
+
{
|
|
179
|
+
var version = "";
|
|
180
|
+
List<Assembly> assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
|
|
181
|
+
foreach (var assembly in assemblies)
|
|
182
|
+
{
|
|
183
|
+
foreach (var oType in assembly.GetTypes())
|
|
184
|
+
{
|
|
185
|
+
if (oType.Name.Equals("AdjustAndroid") || oType.Name.Equals("AdjustiOS") )
|
|
186
|
+
{
|
|
187
|
+
version = oType.GetField("sdkPrefix", BindingFlags.Static | BindingFlags.NonPublic)?.GetValue(null).ToString();
|
|
188
|
+
version = version.StartsWith("unity") ? version.Substring(5) : "";
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return version.Trim();
|
|
194
|
+
}
|
|
175
195
|
|
|
176
196
|
internal static string Ironsource()
|
|
177
197
|
{
|
|
@@ -14,8 +14,14 @@ namespace Amanotes.Editor
|
|
|
14
14
|
|
|
15
15
|
private static readonly Texture2D TAG_0 = (Texture2D)EditorGUIUtility.IconContent("sv_label_0").image;
|
|
16
16
|
private static readonly Texture2D TAG_1 = (Texture2D)EditorGUIUtility.IconContent("sv_icon_dot1_pix16_gizmo").image;
|
|
17
|
-
private static GUIStyle versionStyle
|
|
18
|
-
|
|
17
|
+
private static GUIStyle versionStyle = new GUIStyle(EditorStyles.miniBoldLabel)
|
|
18
|
+
{
|
|
19
|
+
alignment = TextAnchor.MiddleCenter
|
|
20
|
+
};
|
|
21
|
+
private static GUIStyle tagLabelStyle = new GUIStyle(EditorStyles.miniBoldLabel)
|
|
22
|
+
{
|
|
23
|
+
alignment = TextAnchor.MiddleCenter
|
|
24
|
+
};
|
|
19
25
|
|
|
20
26
|
public static void SectionLabel(string text)
|
|
21
27
|
{
|
|
@@ -88,11 +94,6 @@ namespace Amanotes.Editor
|
|
|
88
94
|
public static void SemVerGUI(string title, SemVer version, Color? color1 = null, Color? color2 = null)
|
|
89
95
|
{
|
|
90
96
|
const int TAG_SIZE = 60;
|
|
91
|
-
versionStyle ??= new GUIStyle(EditorStyles.miniBoldLabel)
|
|
92
|
-
{
|
|
93
|
-
alignment = TextAnchor.MiddleCenter
|
|
94
|
-
};
|
|
95
|
-
|
|
96
97
|
var rect = GUILayoutUtility.GetRect(120, 16f);
|
|
97
98
|
var rect1 = rect;
|
|
98
99
|
|
|
@@ -104,8 +105,8 @@ namespace Amanotes.Editor
|
|
|
104
105
|
rect2.xMin += (rect2.width-TAG_SIZE);
|
|
105
106
|
rect2.width = TAG_SIZE;
|
|
106
107
|
|
|
107
|
-
color1
|
|
108
|
-
color2
|
|
108
|
+
if (!color1.HasValue) color1 = LIGHT_BLUE;
|
|
109
|
+
if (!color2.HasValue) color2 = LIGHT_GRAY;
|
|
109
110
|
DrawTag(rect2, version.ToString(), version.isValid ? color1.Value : color2.Value, 0.5f);
|
|
110
111
|
|
|
111
112
|
rect1.xMin += 4f;
|
|
@@ -129,11 +130,6 @@ namespace Amanotes.Editor
|
|
|
129
130
|
|
|
130
131
|
public static void DrawTag(Rect rect, string label, Color tagColor, float alpha = 1f, float margin = 1f)
|
|
131
132
|
{
|
|
132
|
-
tagLabelStyle ??= new GUIStyle(EditorStyles.miniBoldLabel)
|
|
133
|
-
{
|
|
134
|
-
alignment = TextAnchor.MiddleCenter
|
|
135
|
-
};
|
|
136
|
-
|
|
137
133
|
rect.xMin += margin;
|
|
138
134
|
rect.xMax -= margin;
|
|
139
135
|
rect.yMin += margin;
|
|
Binary file
|
|
Binary file
|
|
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
|
@@ -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
|
|
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<
|
|
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<
|
|
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
|
|
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(
|
|
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.
|
|
13
|
+
public const string VERSION = "0.2.12";
|
|
14
14
|
|
|
15
15
|
internal static AmaGDK _instance;
|
|
16
16
|
internal static Status _status = Status.None;
|
|
@@ -197,6 +197,7 @@ namespace Amanotes.Core
|
|
|
197
197
|
public const string FIREBASE_ANALYTICS = "FirebaseAnalytics";
|
|
198
198
|
public const string FIREBASE_REMOTE_CONFIG = "FirebaseRemoteConfig";
|
|
199
199
|
public const string APPSFLYER = "AppsFlyer";
|
|
200
|
+
public const string ADJUST = "Adjust";
|
|
200
201
|
public const string IRONSOURCE = "IronSource";
|
|
201
202
|
public const string REVENUECAT = "RevenueCat";
|
|
202
203
|
}
|