com.amanotes.gdk 0.2.71 → 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 +96 -88
- package/Editor/AmaGDKEditor.cs +1 -1
- package/Editor/EmbedRemoteConfigAssetInspector.cs +1 -1
- package/Editor/Extra/GDKCIBuildCommand.cs +2 -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/AmaGDK.Ads.cs +1 -1
- package/Runtime/AmaGDK.Adapters.cs +1 -1
- package/Runtime/AmaGDK.Analytics.cs +17 -30
- 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 +3 -2
- package/Runtime/AmaGDK.IAP.cs +1 -1
- package/Runtime/AmaGDK.RemoteConfig.cs +2 -2
- package/Runtime/AmaGDK.Singleton.cs +1 -1
- package/Runtime/AmaGDK.UserProfile.cs +12 -11
- package/Runtime/AmaGDK.asmdef +1 -1
- package/Runtime/AmaGDK.cs +7 -7
- package/Runtime/AnalyticQualityAsset.cs +5 -6
- package/Runtime/AudioToolkit/AmaGDK.Audio.cs +3 -2
- package/Runtime/AudioToolkit/Plugins/AudioDeviceDetector.cs +2 -2
- package/Runtime/Core/GDKDebug.cs +97 -0
- package/Runtime/Core/GDKDebug.cs.meta +3 -0
- package/Runtime/Core/GDKPool.cs +56 -337
- 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 +1 -1
- 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 +11 -8
- package/Runtime/Internal/AmaGDK.Internal.cs +22 -33
- package/Runtime/Internal/AmaGDK.Utils.cs +4 -4
- package/Runtime/Internal/AmaGDK.WebUtils.cs +1 -1
- 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 +1 -1
- package/package.json +1 -1
package/Runtime/Fps/AmaFPS.cs
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
// 2. On Android devices (excluding the Unity Editor).
|
|
8
8
|
// 3. In the Unity Editor running on macOS with Apple Silicon (M1, M2, etc.).
|
|
9
9
|
#if UNITY_2021_1_OR_NEWER && ((UNITY_MOBILE && !UNITY_EDITOR) || (UNITY_MOBILE && UNITY_EDITOR_OSX))
|
|
10
|
+
|
|
10
11
|
using System;
|
|
11
12
|
using System.Runtime.InteropServices;
|
|
12
13
|
using Amanotes.Core.Internal;
|
|
14
|
+
using static Amanotes.Core.GDKDebug;
|
|
15
|
+
|
|
13
16
|
using UnityEngine;
|
|
14
17
|
|
|
15
18
|
namespace Amanotes.Core
|
|
@@ -212,7 +215,7 @@ namespace Amanotes.Core
|
|
|
212
215
|
) / numChannel;
|
|
213
216
|
audioData = new float[numSamples*numChannel];
|
|
214
217
|
Marshal.Copy(audioDataResample, audioData, 0, numSamples*numChannel);
|
|
215
|
-
|
|
218
|
+
LogWarning(
|
|
216
219
|
"Warning: The input AudioClip has a sample rate of " + fs + " Hz," +
|
|
217
220
|
" which does not match AudioSetting sample rate of " + AudioSettings.outputSampleRate + " Hz." +
|
|
218
221
|
" GDKAudio will resample the audio to match AudioSetting with high memory usage." +
|
|
@@ -220,17 +223,17 @@ namespace Amanotes.Core
|
|
|
220
223
|
);
|
|
221
224
|
}
|
|
222
225
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
Log("[AAA]numSamples: " + numSamples);
|
|
227
|
+
Log("[AAA]numChannel:" + numChannel);
|
|
228
|
+
Log("[AAA]bufferLength:" + bufferLength);
|
|
229
|
+
Log("[AAA]numBuffer:" + numBuffer);
|
|
227
230
|
|
|
228
231
|
nFFT = 2048;
|
|
229
232
|
// hop = 512;
|
|
230
233
|
|
|
231
234
|
numFrame = (numSamples - nFFT) / hop;
|
|
232
235
|
// Initialize
|
|
233
|
-
|
|
236
|
+
Log("[AAA]TSM_Init");
|
|
234
237
|
TSM_Init(audioData, speed, fs, numChannel, nFFT, hop, ref ptrL, ref ptrR);
|
|
235
238
|
initialized = true;
|
|
236
239
|
hopFrame = new float[hop*numChannel];
|
|
@@ -239,7 +242,7 @@ namespace Amanotes.Core
|
|
|
239
242
|
|
|
240
243
|
audioSource.clip = audioClip;
|
|
241
244
|
audioSource.loop = loop;
|
|
242
|
-
|
|
245
|
+
Log("[AAA]AudioSettings.outputSampleRate (later): " + AudioSettings.outputSampleRate);
|
|
243
246
|
}
|
|
244
247
|
|
|
245
248
|
private void OnAudioFilterRead(float[] data, int channels)
|
|
@@ -257,7 +260,7 @@ namespace Amanotes.Core
|
|
|
257
260
|
return;
|
|
258
261
|
}
|
|
259
262
|
idxFrame = 0;
|
|
260
|
-
|
|
263
|
+
Log("[AAA] Loop");
|
|
261
264
|
}
|
|
262
265
|
|
|
263
266
|
|
|
@@ -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>
|
|
@@ -8,7 +8,7 @@ using System.Text;
|
|
|
8
8
|
using System.Text.RegularExpressions;
|
|
9
9
|
using UnityEngine;
|
|
10
10
|
using UnityEngine.Profiling;
|
|
11
|
-
using static Amanotes.Core.
|
|
11
|
+
using static Amanotes.Core.GDKDebug;
|
|
12
12
|
|
|
13
13
|
namespace Amanotes.Core.Internal
|
|
14
14
|
{
|
|
@@ -268,7 +268,7 @@ namespace Amanotes.Core.Internal
|
|
|
268
268
|
|
|
269
269
|
public static void ClearCacheData()
|
|
270
270
|
{
|
|
271
|
-
var sb = GDKPool.
|
|
271
|
+
var sb = GDKPool.GetStringBuilder();
|
|
272
272
|
sb.AppendLine("[AmaGDK] All cached data & stats cleared");
|
|
273
273
|
|
|
274
274
|
if (!Directory.Exists(basePath))
|
|
@@ -411,7 +411,7 @@ namespace Amanotes.Core.Internal
|
|
|
411
411
|
if (inputDict == null) return "{}";
|
|
412
412
|
|
|
413
413
|
Profiler.BeginSample("AmaGDK.JsonUtils.DictionaryToJson()");
|
|
414
|
-
var jsonSb = GDKPool.
|
|
414
|
+
var jsonSb = GDKPool.GetStringBuilder(8);
|
|
415
415
|
jsonSb.Append("{");
|
|
416
416
|
bool isFirstElement = true;
|
|
417
417
|
|
|
@@ -431,7 +431,7 @@ namespace Amanotes.Core.Internal
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
jsonSb.AppendFormat("{0}{1}", format ? "\n" : "", "}");
|
|
434
|
-
var result = GDKPool.
|
|
434
|
+
var result = GDKPool.ReturnString(jsonSb);
|
|
435
435
|
Profiler.EndSample();
|
|
436
436
|
|
|
437
437
|
return 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)
|