com.amanotes.gdk 0.1.21 → 0.2.2
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 +5 -5
- package/Editor/AmaGDKEditor.cs +91 -46
- package/Editor/AmaGDKManager.cs +26 -27
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +133 -103
- package/Editor/Utils/AmaGDKEditor.GUI.cs +54 -51
- package/Editor/Utils/AmaGDKEditor.Utils.cs +2 -3
- 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/AmaPassport.ATTSupport.unitypackage.meta +7 -0
- package/Packages/AmaPassport.AdvertisingID.unitypackage +0 -0
- package/Packages/AmaPassport.AdvertisingID.unitypackage.meta +7 -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/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage.meta +1 -1
- package/Packages/IronsourceAdapter_v7.2.6.unitypackage +0 -0
- package/Runtime/AmaGDK.Adapters.cs +13 -14
- package/Runtime/AmaGDK.Ads.cs +523 -151
- package/Runtime/AmaGDK.AmaPassport.cs +433 -0
- package/Runtime/AmaGDK.AmaPassport.cs.meta +11 -0
- package/Runtime/AmaGDK.Analytics.cs +78 -89
- package/Runtime/AmaGDK.Config.cs +23 -19
- package/Runtime/AmaGDK.Internal.SemVer.cs +11 -29
- package/Runtime/AmaGDK.Internal.cs +16 -11
- package/Runtime/AmaGDK.RemoteConfig.cs +32 -23
- package/Runtime/AmaGDK.UserProfile.cs +5 -8
- package/Runtime/AmaGDK.Utils.cs +40 -50
- package/Runtime/AmaGDK.WebUtils.cs +42 -42
- package/Runtime/AmaGDK.cs +70 -20
- package/Runtime/AssemblyInfo.cs +0 -1
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
|
-
|
|
4
|
-
using static Amanotes.Core.Internal.Logging;
|
|
5
3
|
using System.Linq;
|
|
4
|
+
using static Amanotes.Core.Internal.Logging;
|
|
6
5
|
|
|
7
6
|
namespace Amanotes.Core.Internal
|
|
8
7
|
{
|
|
@@ -14,7 +13,7 @@ namespace Amanotes.Core.Internal
|
|
|
14
13
|
|
|
15
14
|
// Status support
|
|
16
15
|
public Status status = Status.None;
|
|
17
|
-
public bool IsReady
|
|
16
|
+
public bool IsReady => status == Status.Ready;
|
|
18
17
|
|
|
19
18
|
public void Init()
|
|
20
19
|
{
|
|
@@ -25,7 +24,7 @@ namespace Amanotes.Core.Internal
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
status = Status.Initialize;
|
|
28
|
-
Init(
|
|
27
|
+
Init(success =>
|
|
29
28
|
{
|
|
30
29
|
status = success ? Status.Ready : Status.Failed;
|
|
31
30
|
});
|
|
@@ -53,18 +52,18 @@ namespace Amanotes.Core.Internal
|
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
T adapter = createFunc(AmaGDK.Config);
|
|
56
|
+
InitOrder orderConfig = AmaGDK.Config.initOrder.FirstOrDefault(item => item.id == adapter.adapterId);
|
|
58
57
|
if (orderConfig != null) adapter.initOrder = orderConfig.order;
|
|
59
58
|
listAdapters.Add(adapter);
|
|
60
59
|
}
|
|
61
|
-
|
|
60
|
+
|
|
62
61
|
public static AdapterContext Find<T>()
|
|
63
62
|
{
|
|
64
63
|
for (var i = 0; i < listAdapters.Count; i++)
|
|
65
64
|
{
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
AdapterContext item = listAdapters[i];
|
|
66
|
+
Type itemType = item.GetType();
|
|
68
67
|
if (!typeof(T).IsAssignableFrom(itemType)) continue;
|
|
69
68
|
return item;
|
|
70
69
|
}
|
|
@@ -77,8 +76,8 @@ namespace Amanotes.Core.Internal
|
|
|
77
76
|
var result = new List<AdapterContext>();
|
|
78
77
|
for (var i = 0; i < listAdapters.Count; i++)
|
|
79
78
|
{
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
AdapterContext item = listAdapters[i];
|
|
80
|
+
Type itemType = item.GetType();
|
|
82
81
|
if (!typeof(T).IsAssignableFrom(itemType)) continue;
|
|
83
82
|
result.Add(item);
|
|
84
83
|
}
|
|
@@ -86,9 +85,9 @@ namespace Amanotes.Core.Internal
|
|
|
86
85
|
return result;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
public static T GetSingleAdapter<T>() where T: class
|
|
88
|
+
public static T GetSingleAdapter<T>() where T : class
|
|
90
89
|
{
|
|
91
|
-
|
|
90
|
+
List<AdapterContext> adapters = FindAll<T>();
|
|
92
91
|
|
|
93
92
|
if (adapters == null || adapters.Count < 1)
|
|
94
93
|
{
|
|
@@ -110,4 +109,4 @@ namespace Amanotes.Core.Internal
|
|
|
110
109
|
return (T)AmaGDK.Config;
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
}
|
|
112
|
+
}
|