com.amanotes.gdk 0.2.70 → 0.2.72
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 +113 -87
- package/Editor/AmaGDKEditor.cs +1 -1
- package/Editor/EmbedRemoteConfigAssetInspector.cs +1 -1
- package/Editor/Extra/GDKCIBuildCommand.cs +57 -16
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/Consent.unitypackage +0 -0
- package/Extra/ForceUpdate.unitypackage +0 -0
- package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
- package/Extra/PostProcessor.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.PurchaseConnector.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/MaxAdNetworkAdapter.unitypackage +0 -0
- package/Packages/RevenueCatAdapter.unitypackage +0 -0
- package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
- package/Runtime/Ad/AdExtension.cs +2 -1
- package/Runtime/Ad/AdLogic.cs +1 -1
- package/Runtime/Ad/AdModuleConfig.cs +19 -4
- package/Runtime/Ad/AmaGDK.Ads.cs +20 -8
- package/Runtime/AmaGDK.Adapters.cs +1 -1
- package/Runtime/AmaGDK.Analytics.cs +37 -35
- package/Runtime/AmaGDK.Config.cs +1 -7
- package/Runtime/AmaGDK.Consent.cs +9 -8
- package/Runtime/AmaGDK.Context.cs +1 -1
- package/Runtime/AmaGDK.Device.cs +2 -1
- package/Runtime/AmaGDK.IAP.cs +1 -1
- package/Runtime/AmaGDK.RemoteConfig.cs +1 -1
- package/Runtime/AmaGDK.Singleton.cs +1 -1
- package/Runtime/AmaGDK.UserProfile.cs +12 -11
- package/Runtime/AmaGDK.asmdef +1 -1
- package/Runtime/AmaGDK.cs +6 -6
- package/Runtime/AnalyticQualityAsset.cs +1 -1
- package/Runtime/AudioToolkit/AmaGDK.Audio.cs +3 -2
- package/Runtime/Core/GDKDebug.cs +97 -0
- package/Runtime/Core/GDKDebug.cs.meta +3 -0
- package/Runtime/Core/GDKPool.cs +1 -0
- package/Runtime/Core/GDKRoutine.cs +3 -1
- package/Runtime/Core/GDKSemVer.cs +1 -1
- package/Runtime/Core/GDKString.cs +197 -0
- package/Runtime/Core/GDKString.cs.meta +3 -0
- package/Runtime/EmbedRemoteConfigAsset.cs +2 -1
- package/Runtime/Fps/AmaFPS.Utils.cs +2 -2
- package/Runtime/Fps/AmaFPS.cs +1 -1
- package/Runtime/Fps/AmaFPSVisualizer.cs +1 -1
- package/Runtime/Fps/FrameRecorder.cs +1 -1
- package/Runtime/GDKAudio/GDKAudio.cs +308 -0
- package/Runtime/GDKAudio/GDKAudio.cs.meta +3 -0
- package/Runtime/GDKAudio/Plugins/Android/atensor-release.aar +0 -0
- package/Runtime/GDKAudio/Plugins/Android/atensor-release.aar.meta +32 -0
- package/Runtime/GDKAudio/Plugins/Android.meta +3 -0
- package/Runtime/GDKAudio/Plugins/iOS/libatensor.a +0 -0
- package/Runtime/GDKAudio/Plugins/iOS/libatensor.a.meta +68 -0
- package/Runtime/GDKAudio/Plugins/iOS/libcrypto.a +0 -0
- package/Runtime/GDKAudio/Plugins/iOS/libcrypto.a.meta +68 -0
- package/Runtime/GDKAudio/Plugins/iOS/libssl.a +0 -0
- package/Runtime/GDKAudio/Plugins/iOS/libssl.a.meta +68 -0
- package/Runtime/GDKAudio/Plugins/iOS.meta +8 -0
- package/Runtime/GDKAudio/Plugins/macOS/libatensor.dylib +0 -0
- package/Runtime/GDKAudio/Plugins/macOS/libatensor.dylib.meta +81 -0
- package/Runtime/GDKAudio/Plugins/macOS.meta +8 -0
- package/Runtime/GDKAudio/Plugins.meta +8 -0
- package/Runtime/GDKAudio.meta +3 -0
- package/Runtime/Internal/AmaGDK.Internal.cs +22 -33
- package/Runtime/Internal/AmaGDK.Utils.cs +1 -1
- package/Runtime/Internal/AmaGDK.WebUtils.cs +1 -1
- package/Runtime/Internal/ForceQuitMonitor.cs +7 -2
- package/Runtime/Internal/GDKGeoLocationcs.cs +2 -1
- package/Runtime/Internal/GDKServerTime.cs +2 -1
- package/Runtime/Klavar/KlavarContainer.cs +4 -4
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdFetcher.cs +1 -1
- package/Runtime/Utils/GDKUtils.cs +35 -4
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
using System;
|
|
1
|
+
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
|
-
using System.Text;
|
|
4
3
|
using UnityEngine;
|
|
5
4
|
using UnityObject = UnityEngine.Object;
|
|
6
5
|
using static Amanotes.Core.AmaGDK.Analytics;
|
|
7
6
|
using static Amanotes.Core.AmaGDK;
|
|
7
|
+
using static Amanotes.Core.GDKDebug;
|
|
8
8
|
|
|
9
9
|
#if UNITY_EDITOR
|
|
10
10
|
using UnityEditor;
|
|
@@ -63,40 +63,29 @@ namespace Amanotes.Core.Internal
|
|
|
63
63
|
}
|
|
64
64
|
#endif
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
#if !AMAGDK_DEV
|
|
68
|
+
|
|
69
|
+
[Obsolete("Deprecated class - use GDKDebug instead!")]
|
|
67
70
|
public static class Logging
|
|
68
71
|
{
|
|
69
|
-
|
|
70
|
-
private static readonly HashSet<string> nonFatalDict = new HashSet<string>();
|
|
71
|
-
public static readonly HashSet<string> logWarningDict = new HashSet<string>();
|
|
72
|
-
|
|
72
|
+
[Obsolete("Deprecated method - use GDKDebug.LogWarningOnce() instead!")]
|
|
73
73
|
public static void LogWarningOnce(string message, string key = null)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (!logWarningDict.Add(key)) return;
|
|
78
|
-
Debug.LogWarning($"AmaGDK {message}");
|
|
79
|
-
}
|
|
74
|
+
=> GDKDebug.LogWarningOnce(message, key);
|
|
75
|
+
|
|
76
|
+
[Obsolete("Deprecated method - use GDKDebug.LogWarning() instead!")]
|
|
80
77
|
public static void LogWarning(string message)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
=> GDKDebug.LogWarning(message);
|
|
79
|
+
|
|
80
|
+
[Obsolete("Deprecated method - use GDKDebug.LogError() instead!")]
|
|
84
81
|
public static void LogError(string message)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
GDKUtils.DoOnMainThread(() =>
|
|
89
|
-
{
|
|
90
|
-
if (nonFatalDict.Contains(message)) return; // LogOnce
|
|
91
|
-
nonFatalDict.Add(message);
|
|
92
|
-
logNonfatalErrorHook(message);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
82
|
+
=> GDKDebug.LogError(message);
|
|
83
|
+
|
|
84
|
+
[Obsolete("Deprecated method - use GDKDebug.Log() instead!")]
|
|
95
85
|
public static void Log(string message)
|
|
96
|
-
|
|
97
|
-
if (Config.common.logLevel == LogLevel.Verbose) Debug.Log($"AmaGDK {message}");
|
|
98
|
-
}
|
|
86
|
+
=> GDKDebug.Log(message);
|
|
99
87
|
}
|
|
88
|
+
#endif
|
|
100
89
|
|
|
101
90
|
public static class Forbidden
|
|
102
91
|
{
|
|
@@ -141,7 +130,7 @@ namespace Amanotes.Core.Internal
|
|
|
141
130
|
}
|
|
142
131
|
#endif
|
|
143
132
|
|
|
144
|
-
//
|
|
133
|
+
// LogWarning("Something wrong: another AmaGDK instance found!");
|
|
145
134
|
UnityObject.Destroy(result[i].gameObject);
|
|
146
135
|
}
|
|
147
136
|
|
|
@@ -203,10 +192,10 @@ namespace Amanotes.Core.Internal
|
|
|
203
192
|
public static void ThrowExceptionIfEditor(string message)
|
|
204
193
|
{
|
|
205
194
|
#if UNITY_EDITOR
|
|
206
|
-
throw new GDKException(message);
|
|
207
|
-
#else
|
|
208
|
-
Logging.LogError(message);
|
|
195
|
+
if (Application.isEditor) throw new GDKException(message);
|
|
209
196
|
#endif
|
|
197
|
+
|
|
198
|
+
LogError(message);
|
|
210
199
|
}
|
|
211
200
|
|
|
212
201
|
/// <summary>
|
|
@@ -39,8 +39,13 @@ namespace Amanotes.Core.Internal
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
private readonly ForceQuitData localData = new ForceQuitData();
|
|
43
|
+
|
|
44
|
+
public ForceQuitMonitor()
|
|
45
|
+
{
|
|
46
|
+
AmaGDK.Analytics.OnEventSent += OnLogEvent;
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
private string GetStringValueOrDefault(Dictionary<string, object> dict, string key, string defaultValue = "")
|
|
45
50
|
{
|
|
46
51
|
return dict.TryGetValue(key, out object result)
|
|
@@ -2,6 +2,7 @@ using System;
|
|
|
2
2
|
using System.Collections;
|
|
3
3
|
using UnityEngine;
|
|
4
4
|
using UnityEngine.Networking;
|
|
5
|
+
using static Amanotes.Core.GDKDebug;
|
|
5
6
|
|
|
6
7
|
namespace Amanotes.Core.Internal
|
|
7
8
|
{
|
|
@@ -39,7 +40,7 @@ namespace Amanotes.Core.Internal
|
|
|
39
40
|
{
|
|
40
41
|
result?.Invoke(data.countryCode?.ToUpper());
|
|
41
42
|
if (data.errorMessage != null)
|
|
42
|
-
|
|
43
|
+
Log(data.errorMessage);
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -3,6 +3,7 @@ using System.Collections;
|
|
|
3
3
|
using System.Collections.Generic;
|
|
4
4
|
using UnityEngine;
|
|
5
5
|
using UnityEngine.Networking;
|
|
6
|
+
using static Amanotes.Core.GDKDebug;
|
|
6
7
|
|
|
7
8
|
namespace Amanotes.Core
|
|
8
9
|
{
|
|
@@ -189,7 +190,7 @@ namespace Amanotes.Core.Internal
|
|
|
189
190
|
else
|
|
190
191
|
{
|
|
191
192
|
result?.Invoke(null);
|
|
192
|
-
|
|
193
|
+
Log(data.errorMessage);
|
|
193
194
|
FetchTimeWithOtherProvider();
|
|
194
195
|
}
|
|
195
196
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Reflection;
|
|
3
|
-
using Amanotes.Core.Internal;
|
|
4
3
|
using UnityEngine;
|
|
5
4
|
using GUID = System.Guid;
|
|
5
|
+
using static Amanotes.Core.GDKDebug;
|
|
6
6
|
|
|
7
7
|
namespace Amanotes.Core
|
|
8
8
|
{
|
|
@@ -26,10 +26,10 @@ namespace Amanotes.Core
|
|
|
26
26
|
public static void ThrowIfEditor(string message)
|
|
27
27
|
{
|
|
28
28
|
#if UNITY_EDITOR
|
|
29
|
-
throw new KlavarException(message);
|
|
30
|
-
#else
|
|
31
|
-
Logging.LogError(message);
|
|
29
|
+
if (Application.isEditor) throw new KlavarException(message);
|
|
32
30
|
#endif
|
|
31
|
+
|
|
32
|
+
LogError(message);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
public static void ThrowErrorOnField(object parent, FieldInfo fieldInfo, string message)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using UnityEngine;
|
|
3
|
-
using static Amanotes.Core.
|
|
3
|
+
using static Amanotes.Core.GDKDebug;
|
|
4
4
|
|
|
5
5
|
namespace Amanotes.Core.Internal
|
|
6
6
|
{
|
|
@@ -12,13 +12,13 @@ namespace Amanotes.Core.Internal
|
|
|
12
12
|
|
|
13
13
|
if (Application.isEditor)
|
|
14
14
|
{
|
|
15
|
-
action
|
|
15
|
+
action();
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
try
|
|
20
20
|
{
|
|
21
|
-
action
|
|
21
|
+
action();
|
|
22
22
|
} catch (Exception e)
|
|
23
23
|
{
|
|
24
24
|
LogError(e.ToString());
|
|
@@ -27,9 +27,40 @@ namespace Amanotes.Core.Internal
|
|
|
27
27
|
|
|
28
28
|
public static void SafeInvoke<T>(Action<T> action, T eventObject)
|
|
29
29
|
{
|
|
30
|
-
|
|
30
|
+
if (action == null) return;
|
|
31
|
+
|
|
32
|
+
if (Application.isEditor)
|
|
33
|
+
{
|
|
34
|
+
action(eventObject);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
try
|
|
39
|
+
{
|
|
40
|
+
action(eventObject);
|
|
41
|
+
} catch (Exception e)
|
|
42
|
+
{
|
|
43
|
+
LogError(e.ToString());
|
|
44
|
+
}
|
|
31
45
|
}
|
|
32
46
|
|
|
47
|
+
public static void SafeInvoke<T1, T2>(Action<T1, T2> action, T1 p1, T2 p2)
|
|
48
|
+
{
|
|
49
|
+
if (Application.isEditor)
|
|
50
|
+
{
|
|
51
|
+
action(p1, p2);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
try
|
|
56
|
+
{
|
|
57
|
+
action(p1, p2);
|
|
58
|
+
} catch (Exception e)
|
|
59
|
+
{
|
|
60
|
+
LogError(e.ToString());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
33
64
|
public static void ThrowExceptionInEditor<T>(string message, Func<string, T> exceptionCreator) where T: Exception
|
|
34
65
|
{
|
|
35
66
|
if (Application.isEditor)
|