com.amanotes.gdk 0.1.19 → 0.1.20

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.20 - 2023-04-20]
4
+ ### Refactor Adapter architure to support reading adapter config from Core
5
+ ### Add session stat for Analytics module
6
+ ### Unit test for Json parser and Analytics module
7
+
3
8
  ## [0.1.19 - 2023-04-11]
4
9
  ### Move AmaGDKTest out of AmaGDKCore
5
10
 
Binary file
Binary file
Binary file
@@ -44,7 +44,6 @@ namespace Amanotes.Core.Internal
44
44
  "FirebaseAnalyticsAdapter_v9.1.0",
45
45
  "AppsFlyerAdapter_v6.5.4",
46
46
  // "IronsourceAdapter_v7.2.6",
47
- "FirebaseRemoteConfigAdapter_v9.1.0"
48
47
  };
49
48
 
50
49
  #if UNITY_EDITOR
@@ -68,6 +67,7 @@ namespace Amanotes.Core.Internal
68
67
  #endif
69
68
  }
70
69
 
70
+
71
71
  public static class Logging
72
72
  {
73
73
  public static readonly StringBuilder tmpWarningSB = new StringBuilder();
package/Runtime/AmaGDK.cs CHANGED
@@ -12,7 +12,7 @@ namespace Amanotes.Core
12
12
  {
13
13
  public partial class AmaGDK : MonoBehaviour
14
14
  {
15
- public const string VERSION = "0.1.19";
15
+ public const string VERSION = "0.1.20";
16
16
 
17
17
  internal static AmaGDK _instance;
18
18
  internal static event Action _frameUpdate;
@@ -102,7 +102,6 @@ namespace Amanotes.Core
102
102
 
103
103
  // Init modules (Adapter managers)
104
104
  Analytics.Init();
105
- RemoteConfig.Init();
106
105
  //Ads.Init();
107
106
 
108
107
  _status = Status.Ready;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2020.3",
@@ -1,116 +0,0 @@
1
- using System;
2
- using System.Collections;
3
- using System.Collections.Generic;
4
- using System.Threading.Tasks;
5
- using UnityEngine;
6
-
7
- using Amanotes.Core.Internal;
8
- using static Amanotes.Core.Internal.Logging;
9
- using Firebase.RemoteConfig;
10
-
11
- namespace Amanotes.Core
12
- {
13
- public partial class AmaGDK //Remote Config
14
- {
15
- [Serializable]
16
- public partial class RemoteConfig //Public
17
- {
18
- internal static IRemoteConfig remoteConfigAdapter;
19
-
20
- public static void Init()
21
- {
22
- var remoteConfigAdapters = Adapter.FindAll<IRemoteConfig>();
23
-
24
- if (remoteConfigAdapters == null || remoteConfigAdapters.Count < 1)
25
- {
26
- LogError("Not found remote config module!");
27
- return;
28
- }
29
-
30
- if (remoteConfigAdapters.Count > 1)
31
- {
32
- LogError("Multiple remote config adapters is not supported!");
33
- return;
34
- }
35
-
36
- remoteConfigAdapter = remoteConfigAdapters[0].GetAdapterApi<IRemoteConfig>();
37
- }
38
-
39
- public static Task SetDefault(IDictionary<string, object> config)
40
- {
41
- if (AdapterNotReady()) return Task.FromException(new Exception("Unable to set default value for remote config"));
42
- return remoteConfigAdapter.SetDefault(config);
43
- }
44
-
45
- public static Task Fetch()
46
- {
47
- if (AdapterNotReady()) return Task.FromException(new Exception("Unable to fetch remote config"));
48
- return remoteConfigAdapter.Fetch();
49
- }
50
-
51
- public static Task Activate()
52
- {
53
- if (AdapterNotReady()) return Task.FromException(new Exception("Unable to activate remote config"));
54
- return remoteConfigAdapter.Activate();
55
- }
56
-
57
- public static Task FetchAndActivate()
58
- {
59
- if (AdapterNotReady()) return Task.FromException(new Exception("Unable to fetch and activate remote config"));
60
- return remoteConfigAdapter.FetchAndActivate();
61
- }
62
-
63
- public static bool GetBool(string key)
64
- {
65
- if (AdapterNotReady()) return false;
66
- return remoteConfigAdapter.GetBool(key);
67
- }
68
-
69
- public static double GetDouble(string key)
70
- {
71
- if (AdapterNotReady()) return 0;
72
- return remoteConfigAdapter.GetDouble(key);
73
- }
74
-
75
- public static long GetLong(string key)
76
- {
77
- if (AdapterNotReady()) return 0;
78
- return remoteConfigAdapter.GetLong(key);
79
- }
80
-
81
- public static string GetString(string key)
82
- {
83
- if (AdapterNotReady()) return "";
84
- return remoteConfigAdapter.GetString(key);
85
- }
86
- }
87
-
88
- public partial class RemoteConfig //Internal
89
- {
90
- internal static bool AdapterNotReady()
91
- {
92
- if (remoteConfigAdapter == null)
93
- {
94
- LogWarning("Remote config adapter is not ready");
95
- return true;
96
- }
97
- return false;
98
- }
99
- }
100
- }
101
- }
102
-
103
- namespace Amanotes.Core.Internal
104
- {
105
- public interface IRemoteConfig
106
- {
107
- Task Fetch();
108
- Task Activate();
109
- Task FetchAndActivate();
110
- Task SetDefault(IDictionary<string, object> config);
111
- bool GetBool(string key);
112
- double GetDouble(string key);
113
- long GetLong(string key);
114
- string GetString(string key);
115
- }
116
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: d81aa5ad940bd43139879d9d53e0e00b
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant: