com.amanotes.gdk 0.2.97 → 0.2.99
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 +14 -0
- package/Editor/AmaGDK.Editor.asmdef +2 -1
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AutoEventQC.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/Consent.unitypackage +0 -0
- package/Extra/CrashlyticHook.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/AmaGDK.Ads.cs +18 -0
- package/Runtime/AmaGDK.IAP.cs +8 -0
- package/Runtime/AmaGDK.asmdef +2 -1
- package/Runtime/AmaGDK.cs +1 -103
- package/package.json +7 -3
- package/Editor/Extra/GDKLocalBuild.cs +0 -910
- package/Editor/Extra/GDKLocalBuild.cs.meta +0 -3
- package/Editor/Extra/GDKProjectCP.cs +0 -216
- package/Editor/Extra/GDKProjectCP.cs.meta +0 -11
- package/Editor/Extra/GDKSymbolDefine.cs +0 -396
- package/Editor/Extra/GDKSymbolDefine.cs.meta +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [0.2.99] - 2026-05-06
|
|
2
|
+
- [Feature] LevelPlay uses multiple ad units
|
|
3
|
+
- [Dev] Add dependencies
|
|
4
|
+
- [Fix] Update Android settings of GDKTest projects
|
|
5
|
+
- [Dev] Extract & Remove Dev mode from GDK
|
|
6
|
+
- [Fix] Update 3rd-party packages for codebase compatibility
|
|
7
|
+
- [Dev] GDKTest: Replace Unity 6.2 by 6.3
|
|
8
|
+
- [Dev] Add Unity MCP + AmaDev
|
|
9
|
+
- [Fix] Compiler error on Desktop
|
|
10
|
+
- [Dev] Add AmaDev package
|
|
11
|
+
- [Dev] Extract GDKLocalBuild / GDKProjectCP / GDKSymbolDefine
|
|
12
|
+
- [Dev] Update kiro settings
|
|
13
|
+
- [Fix] wrong class path in integration_test
|
|
14
|
+
|
|
1
15
|
## [0.2.97] - 2026-04-03
|
|
2
16
|
- [Dev] Manually logConsumableTransaction for iOS
|
|
3
17
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
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/Ad/AmaGDK.Ads.cs
CHANGED
|
@@ -168,6 +168,13 @@ namespace Amanotes.Core
|
|
|
168
168
|
{
|
|
169
169
|
if (_adapter == null) return;
|
|
170
170
|
|
|
171
|
+
GDKUtils.StartCoroutine(StartModuleRoutine());
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private static IEnumerator StartModuleRoutine()
|
|
175
|
+
{
|
|
176
|
+
yield return new WaitUntil(() => _adapter.IsReady);
|
|
177
|
+
|
|
171
178
|
if (Config.ad.enableInterstitial) _adapter.interstitial.StartLoadAd();
|
|
172
179
|
if (Config.ad.enableRewarded) _adapter.rewardVideo.StartLoadAd();
|
|
173
180
|
if (Config.ad.preloadBanner) PreloadBanner();
|
|
@@ -287,6 +294,13 @@ namespace Amanotes.Core
|
|
|
287
294
|
_adapter.HideBanner();
|
|
288
295
|
}
|
|
289
296
|
|
|
297
|
+
public static void LoadBannerAd()
|
|
298
|
+
{
|
|
299
|
+
if (!_config.ad.enableBanner) return;
|
|
300
|
+
if (_adapter == null) return;
|
|
301
|
+
_adapter.RequestBannerReload();
|
|
302
|
+
}
|
|
303
|
+
|
|
290
304
|
public static void StopWaitForAd()
|
|
291
305
|
{
|
|
292
306
|
if (_adapter == null) return;
|
|
@@ -354,6 +368,10 @@ namespace Amanotes.Core.Internal
|
|
|
354
368
|
public abstract void ShowBanner();
|
|
355
369
|
public abstract void HideBanner();
|
|
356
370
|
|
|
371
|
+
public virtual void RequestBannerReload()
|
|
372
|
+
{
|
|
373
|
+
}
|
|
374
|
+
|
|
357
375
|
// Internally used
|
|
358
376
|
internal protected abstract void SetUserId(string userId);
|
|
359
377
|
}
|
package/Runtime/AmaGDK.IAP.cs
CHANGED
|
@@ -14,6 +14,8 @@ namespace Amanotes.Core
|
|
|
14
14
|
{
|
|
15
15
|
public partial class IAP //Public
|
|
16
16
|
{
|
|
17
|
+
public static event Action<string> OnStoreKit2Consumable;
|
|
18
|
+
|
|
17
19
|
public static bool IsVIP => !string.IsNullOrEmpty(localData.activeSubscriptionId);
|
|
18
20
|
public static string ActiveSubscriptionId => localData.activeSubscriptionId;
|
|
19
21
|
public static string SubscriptionPeriodType => localData.subscriptionPeriodType;
|
|
@@ -162,6 +164,12 @@ namespace Amanotes.Core
|
|
|
162
164
|
|
|
163
165
|
public partial class IAP //Internal
|
|
164
166
|
{
|
|
167
|
+
public static void NotifyStoreKit2Consumable(string storeKit2TransactionId)
|
|
168
|
+
{
|
|
169
|
+
if (string.IsNullOrEmpty(storeKit2TransactionId)) return;
|
|
170
|
+
OnStoreKit2Consumable?.Invoke(storeKit2TransactionId);
|
|
171
|
+
}
|
|
172
|
+
|
|
165
173
|
private static IAPAdapter _adapter;
|
|
166
174
|
internal static IAPData localData;
|
|
167
175
|
internal static IAPAdapter Adapter
|
package/Runtime/AmaGDK.asmdef
CHANGED
package/Runtime/AmaGDK.cs
CHANGED
|
@@ -27,7 +27,7 @@ namespace Amanotes.Core
|
|
|
27
27
|
{
|
|
28
28
|
public partial class AmaGDK : MonoBehaviour
|
|
29
29
|
{
|
|
30
|
-
public const string VERSION = "0.2.
|
|
30
|
+
public const string VERSION = "0.2.99";
|
|
31
31
|
|
|
32
32
|
internal static Status _status = Status.None;
|
|
33
33
|
internal static ConfigAsset _config = null;
|
|
@@ -474,108 +474,6 @@ namespace Amanotes.Core
|
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
public partial class AmaGDK // Switch dev mode
|
|
478
|
-
{
|
|
479
|
-
#if UNITY_EDITOR
|
|
480
|
-
[ContextMenu("Change To Dev Mode")]
|
|
481
|
-
public void ChangeDevMode()
|
|
482
|
-
{
|
|
483
|
-
const string variableName = "GDK_HOME";
|
|
484
|
-
string zshrcPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".zshrc");
|
|
485
|
-
string zshrcContent;
|
|
486
|
-
|
|
487
|
-
try
|
|
488
|
-
{
|
|
489
|
-
zshrcContent = File.ReadAllText(zshrcPath);
|
|
490
|
-
}
|
|
491
|
-
catch (FileNotFoundException)
|
|
492
|
-
{
|
|
493
|
-
Debug.LogWarning($"Zsh configuration file {zshrcPath} not found.");
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
if (!zshrcContent.Contains($"export {variableName}="))
|
|
498
|
-
{
|
|
499
|
-
Debug.LogWarning($"{variableName} environment variable is not set in {zshrcPath}.");
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
int startIndex = zshrcContent.IndexOf($"export {variableName}=", StringComparison.Ordinal);
|
|
504
|
-
if (startIndex >= 0)
|
|
505
|
-
{
|
|
506
|
-
startIndex += $"export {variableName}=".Length;
|
|
507
|
-
int endIndex = zshrcContent.IndexOfAny(new char[] { '\n', '\r' }, startIndex);
|
|
508
|
-
string gdkHomeValue = endIndex >= 0
|
|
509
|
-
? zshrcContent.Substring(startIndex, endIndex - startIndex).Trim()
|
|
510
|
-
: zshrcContent.Substring(startIndex).Trim();
|
|
511
|
-
|
|
512
|
-
if (string.IsNullOrEmpty(gdkHomeValue))
|
|
513
|
-
{
|
|
514
|
-
Debug.LogWarning($"{variableName} environment variable is set but has an empty value in {zshrcPath}.");
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
if (!Directory.Exists(gdkHomeValue))
|
|
519
|
-
{
|
|
520
|
-
Debug.LogWarning($"{variableName} environment variable is set to <{gdkHomeValue}> but the path is not exist!");
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
string output = RunShellCommand($"source ~/.zshrc && echo file:${variableName}");
|
|
526
|
-
output = output.Trim();
|
|
527
|
-
UpdateManifest(output);
|
|
528
|
-
|
|
529
|
-
UnityEditor.AssetDatabase.Refresh(UnityEditor.ImportAssetOptions.ForceUpdate);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
private string RunShellCommand(string command)
|
|
533
|
-
{
|
|
534
|
-
Process process = new Process();
|
|
535
|
-
process.StartInfo.FileName = "/bin/zsh";
|
|
536
|
-
process.StartInfo.Arguments = $"-c \"{command}\"";
|
|
537
|
-
process.StartInfo.RedirectStandardOutput = true;
|
|
538
|
-
process.StartInfo.UseShellExecute = false;
|
|
539
|
-
process.StartInfo.CreateNoWindow = true;
|
|
540
|
-
process.Start();
|
|
541
|
-
|
|
542
|
-
string output = process.StandardOutput.ReadToEnd();
|
|
543
|
-
process.WaitForExit();
|
|
544
|
-
|
|
545
|
-
return output;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
private void UpdateManifest(string strDesired)
|
|
549
|
-
{
|
|
550
|
-
try
|
|
551
|
-
{
|
|
552
|
-
const string manifestPath = "Packages/manifest.json";
|
|
553
|
-
string manifestJson = File.ReadAllText(manifestPath);
|
|
554
|
-
|
|
555
|
-
var pattern = "\"com\\.amanotes\\.gdk\": \"(.*)\"";
|
|
556
|
-
var devModeEntry = $"\"com.amanotes.gdk\": \"{strDesired}\"";
|
|
557
|
-
|
|
558
|
-
manifestJson = Regex.Replace(manifestJson, pattern, devModeEntry);
|
|
559
|
-
File.WriteAllText(manifestPath, manifestJson);
|
|
560
|
-
|
|
561
|
-
if (!File.ReadAllText(manifestPath).Contains(devModeEntry))
|
|
562
|
-
{
|
|
563
|
-
Debug.LogWarning($"AmaGDK changes to dev mode failed. The expected value is: {devModeEntry}");
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
AssetDatabase.Refresh();
|
|
568
|
-
Client.Resolve();
|
|
569
|
-
Debug.Log("AmaGDK changes to dev mode successfully");
|
|
570
|
-
}
|
|
571
|
-
catch (Exception e)
|
|
572
|
-
{
|
|
573
|
-
Debug.LogWarning($"AmaGDK changes to dev exception: {e.Message}");
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
#endif
|
|
577
|
-
}
|
|
578
|
-
|
|
579
477
|
public partial class AmaGDK
|
|
580
478
|
{
|
|
581
479
|
public static class Hook
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.amanotes.gdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.99",
|
|
4
4
|
"displayName": "AmaGDK",
|
|
5
5
|
"description": "Amanotes Game Development Kit",
|
|
6
6
|
"unity": "2020.3",
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"changelogUrl": "https://amagdk.notion.site/Change-Log-6dfd4b67d64f496bbd9eb04ccb4ef95a",
|
|
18
18
|
"documentationUrl": "https://amagdk.notion.site/amagdk/Ama-GDK-a73596617ab247b6a43c8f12a1581415",
|
|
19
|
-
"license": "MIT",
|
|
20
19
|
"dependencies": {
|
|
21
|
-
"com.cysharp.unitask": "2.5.10"
|
|
20
|
+
"com.cysharp.unitask": "2.5.10",
|
|
21
|
+
"com.unity.ugui": "1.0.0",
|
|
22
|
+
"com.unity.modules.imgui": "1.0.0",
|
|
23
|
+
"com.unity.modules.ui": "1.0.0",
|
|
24
|
+
"com.unity.modules.androidjni": "1.0.0",
|
|
25
|
+
"com.unity.modules.audio": "1.0.0"
|
|
22
26
|
},
|
|
23
27
|
"scopedRegistries": [
|
|
24
28
|
{
|