com.amanotes.gdk 0.2.38 → 0.2.39
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 +4 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AmaGDKProject.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdRevenuePlugin.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/Packages/RevenueCatAdapter_v6.0.0.unitypackage +0 -0
- package/Runtime/AmaGDK.Ads.cs +1 -1
- package/Runtime/AmaGDK.cs +37 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
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
package/Runtime/AmaGDK.cs
CHANGED
|
@@ -9,12 +9,13 @@ using Amanotes.Core.Internal;
|
|
|
9
9
|
using UnityEngine;
|
|
10
10
|
using static Amanotes.Core.Internal.Logging;
|
|
11
11
|
using static Amanotes.Core.Internal.Messsage;
|
|
12
|
+
using Debug = UnityEngine.Debug;
|
|
12
13
|
|
|
13
14
|
namespace Amanotes.Core
|
|
14
15
|
{
|
|
15
16
|
public partial class AmaGDK : MonoBehaviour
|
|
16
17
|
{
|
|
17
|
-
public const string VERSION = "0.2.
|
|
18
|
+
public const string VERSION = "0.2.39";
|
|
18
19
|
|
|
19
20
|
internal static AmaGDK _instance;
|
|
20
21
|
internal static Status _status = Status.None;
|
|
@@ -291,17 +292,45 @@ namespace Amanotes.Core
|
|
|
291
292
|
public void ChangeDevMode()
|
|
292
293
|
{
|
|
293
294
|
string variableName = "GDK_HOME";
|
|
294
|
-
string
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
295
|
+
string zshrcPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".zshrc");
|
|
296
|
+
string zshrcContent;
|
|
297
|
+
|
|
298
|
+
try
|
|
299
|
+
{
|
|
300
|
+
zshrcContent = File.ReadAllText(zshrcPath);
|
|
301
|
+
}
|
|
302
|
+
catch (FileNotFoundException)
|
|
303
|
+
{
|
|
304
|
+
Debug.LogWarning($"Zsh configuration file {zshrcPath} not found.");
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (!zshrcContent.Contains($"export {variableName}="))
|
|
298
309
|
{
|
|
299
|
-
LogWarning($"{variableName} environment variable is not set.");
|
|
310
|
+
Debug.LogWarning($"{variableName} environment variable is not set in {zshrcPath}.");
|
|
300
311
|
return;
|
|
301
312
|
}
|
|
313
|
+
|
|
314
|
+
int startIndex = zshrcContent.IndexOf($"export {variableName}=");
|
|
315
|
+
if (startIndex >= 0)
|
|
316
|
+
{
|
|
317
|
+
startIndex += $"export {variableName}=".Length;
|
|
318
|
+
int endIndex = zshrcContent.IndexOfAny(new char[] { '\n', '\r' }, startIndex);
|
|
319
|
+
string gdkHomeValue = endIndex >= 0
|
|
320
|
+
? zshrcContent.Substring(startIndex, endIndex - startIndex).Trim()
|
|
321
|
+
: zshrcContent.Substring(startIndex).Trim();
|
|
302
322
|
|
|
303
|
-
|
|
304
|
-
|
|
323
|
+
if (string.IsNullOrEmpty(gdkHomeValue))
|
|
324
|
+
{
|
|
325
|
+
Debug.LogWarning($"{variableName} environment variable is set but has an empty value in {zshrcPath}.");
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
string output = RunShellCommand($"source ~/.zshrc && echo file:${variableName}");
|
|
331
|
+
output = output.Trim();
|
|
332
|
+
UpdateManifest(output);
|
|
333
|
+
Debug.Log("AmaGDK changes to dev mode successfully");
|
|
305
334
|
}
|
|
306
335
|
|
|
307
336
|
private string RunShellCommand(string command)
|