com.amanotes.gdk 0.2.47 → 0.2.49

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/Editor/AmaGDKEditor.cs +133 -65
  3. package/Editor/AmaGDKExtra.cs +31 -0
  4. package/Editor/AmaGDKExtra.cs.meta +11 -0
  5. package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +1 -1
  6. package/Extra/AmaGDKInstaller.unitypackage +0 -0
  7. package/Extra/AmaGDKProject.unitypackage +0 -0
  8. package/Extra/SDKVersionTracking.unitypackage +0 -0
  9. package/Extra/SDKVersionTracking.unitypackage.meta +7 -0
  10. package/Packages/AmaGDKConfig.unitypackage +0 -0
  11. package/Packages/AmaGDKExample.unitypackage +0 -0
  12. package/Packages/AmaGDKTest.unitypackage +0 -0
  13. package/Packages/AppsFlyerAdapter.unitypackage +0 -0
  14. package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
  15. package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
  16. package/Packages/IronSourceAdapter.unitypackage +0 -0
  17. package/Packages/RevenueCatAdapter.unitypackage +0 -0
  18. package/Runtime/AmaGDK.Adapters.cs +0 -4
  19. package/Runtime/AmaGDK.Ads.cs +89 -29
  20. package/Runtime/AmaGDK.Analytics.cs +97 -64
  21. package/Runtime/AmaGDK.IAP.cs +39 -45
  22. package/Runtime/AmaGDK.RemoteConfig.cs +76 -52
  23. package/Runtime/AmaGDK.UserProfile.cs +106 -124
  24. package/Runtime/AmaGDK.cs +46 -35
  25. package/Runtime/Internal/AmaGDK.Event.cs +185 -0
  26. package/Runtime/Internal/AmaGDK.Event.cs.meta +3 -0
  27. package/Runtime/Internal/AmaGDK.Internal.cs +3 -0
  28. package/Runtime/Internal/AmaGDK.Utils.cs +85 -24
  29. package/Runtime/Klavar/Attributes/AccumulatedCountAttribute.cs +19 -0
  30. package/Runtime/Klavar/Attributes/AccumulatedCountAttribute.cs.meta +11 -0
  31. package/Runtime/Klavar/Attributes/ConnectionAttribute.cs +18 -0
  32. package/Runtime/Klavar/Attributes/ConnectionAttribute.cs.meta +11 -0
  33. package/Runtime/Klavar/Attributes/CountInSessionAttribute.cs +27 -0
  34. package/Runtime/Klavar/Attributes/CountInSessionAttribute.cs.meta +11 -0
  35. package/Runtime/Klavar/Attributes/DescriptionAttribute.cs +7 -0
  36. package/Runtime/Klavar/Attributes/DescriptionAttribute.cs.meta +11 -0
  37. package/Runtime/Klavar/Attributes/DynamicValidateAttribute.cs +30 -0
  38. package/Runtime/Klavar/Attributes/DynamicValidateAttribute.cs.meta +11 -0
  39. package/Runtime/Klavar/Attributes/IgnoreAttribute.cs +16 -0
  40. package/Runtime/Klavar/Attributes/IgnoreAttribute.cs.meta +11 -0
  41. package/Runtime/Klavar/Attributes/MinMaxAttribute.cs +130 -0
  42. package/Runtime/Klavar/Attributes/MinMaxAttribute.cs.meta +11 -0
  43. package/Runtime/Klavar/Attributes/MinMaxLengthAttribute.cs +88 -0
  44. package/Runtime/Klavar/Attributes/MinMaxLengthAttribute.cs.meta +11 -0
  45. package/Runtime/Klavar/Attributes/NameAttribute.cs +35 -0
  46. package/Runtime/Klavar/Attributes/NameAttribute.cs.meta +11 -0
  47. package/Runtime/Klavar/Attributes/NotNullAttribute.cs +16 -0
  48. package/Runtime/Klavar/Attributes/NotNullAttribute.cs.meta +11 -0
  49. package/Runtime/Klavar/Attributes/RegexPatternAttribute.cs +58 -0
  50. package/Runtime/Klavar/Attributes/RegexPatternAttribute.cs.meta +11 -0
  51. package/Runtime/Klavar/Attributes/TimeDiffLastFireAttribute.cs +28 -0
  52. package/Runtime/Klavar/Attributes/TimeDiffLastFireAttribute.cs.meta +11 -0
  53. package/Runtime/Klavar/Attributes/ToStringAttribute.cs +97 -0
  54. package/Runtime/Klavar/Attributes/ToStringAttribute.cs.meta +11 -0
  55. package/Runtime/Klavar/Attributes/ValueAttribute.cs +30 -0
  56. package/Runtime/Klavar/Attributes/ValueAttribute.cs.meta +11 -0
  57. package/Runtime/Klavar/Attributes.meta +8 -0
  58. package/Runtime/Klavar/KlavarEvent.cs +91 -0
  59. package/Runtime/Klavar/KlavarEvent.cs.meta +11 -0
  60. package/Runtime/Klavar/KlavarEventAttribute.cs +39 -0
  61. package/Runtime/Klavar/KlavarEventAttribute.cs.meta +11 -0
  62. package/Runtime/Klavar/KlavarEventTools.cs +92 -0
  63. package/Runtime/Klavar/KlavarEventTools.cs.meta +11 -0
  64. package/Runtime/Klavar/KlavarEventUtils.cs +58 -0
  65. package/Runtime/Klavar/KlavarEventUtils.cs.meta +11 -0
  66. package/Runtime/{Core.meta → Klavar.meta} +1 -1
  67. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 3d37423ab39204191b9b7c3d3ea832b2
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,39 @@
1
+ using System;
2
+ using System.Reflection;
3
+
4
+
5
+ namespace Amanotes.Core
6
+ {
7
+ /// <summary>
8
+ /// Pretty Log Event Attribute
9
+ /// </summary>
10
+ public abstract class KlavarEventAttribute : Attribute
11
+ {
12
+ }
13
+
14
+ /// <summary>
15
+ /// Validate Property Attribute
16
+ /// </summary>
17
+ public abstract class ValidateLogEventAttribute : KlavarEventAttribute
18
+ {
19
+ public abstract void Validate(object parent, FieldInfo fieldInfo, object param);
20
+ }
21
+
22
+ /// <summary>
23
+ /// Converter Value of Property Attribute
24
+ /// </summary>
25
+ public abstract class ConverterLogEventAttribute : KlavarEventAttribute
26
+ {
27
+ public abstract object Convert(object parent, FieldInfo fieldInfo, object param);
28
+ }
29
+
30
+
31
+ /// <summary>
32
+ /// Nameing Property Attribute
33
+ /// </summary>
34
+ public abstract class NamingLogEventAttribute : KlavarEventAttribute
35
+ {
36
+ public abstract string GetName(object parent, FieldInfo fieldInfo);
37
+ }
38
+ }
39
+
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 2c3072fee96b44e089d862bfd938f252
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,92 @@
1
+ //
2
+ // #if UNITY_EDITOR
3
+ //
4
+ // using System.Linq;
5
+ // using System.Collections;
6
+ // using UnityEditor;
7
+ // using UnityEngine;
8
+ //
9
+ // using System.IO;
10
+ // using System.Collections.Generic;
11
+ // using System;
12
+ //
13
+ // namespace Amanotes.Core
14
+ // {
15
+ // /// <summary>
16
+ // /// Prety Log Event Tools
17
+ // /// </summary>
18
+ // public class KlavarEventTools
19
+ // {
20
+ // public class KlavarEventLine
21
+ // {
22
+ // public string No;
23
+ // public string EventName;
24
+ // public string EventParameterName;
25
+ //
26
+ // public string ValueType;
27
+ //
28
+ // public string ParameterValue;
29
+ //
30
+ // public bool IsInvalid()
31
+ // {
32
+ // return string.IsNullOrWhiteSpace(No)
33
+ // && string.IsNullOrWhiteSpace(EventName)
34
+ // && string.IsNullOrWhiteSpace(EventParameterName)
35
+ // && string.IsNullOrWhiteSpace(ValueType)
36
+ // && string.IsNullOrWhiteSpace(ParameterValue);
37
+ // }
38
+ // }
39
+ //
40
+ // static private IEnumerable<T[]> Chunk<T>(IEnumerable<T> colection, Func<T, bool> splitter)
41
+ // {
42
+ //
43
+ // IEnumerator<T> iter = colection.GetEnumerator();
44
+ // var running = iter.MoveNext();
45
+ //
46
+ // IEnumerable<T> OneChunk()
47
+ // {
48
+ // yield return iter.Current;
49
+ // while (running = iter.MoveNext())
50
+ // {
51
+ // var val = iter.Current;
52
+ // if (splitter(val)) break;
53
+ // yield return val;
54
+ // }
55
+ // }
56
+ //
57
+ // while (running)
58
+ // {
59
+ // var chunk = OneChunk().ToArray();
60
+ // if (chunk.Length > 0) yield return chunk;
61
+ // }
62
+ // }
63
+ //
64
+ //
65
+ // static void ConvertFromCSV()
66
+ // {
67
+ //
68
+ // // string path = EditorUtility.OpenFilePanel("Overwrite with png", ".", "tsv");
69
+ //
70
+ // var path = "/Users/nam.dn/Downloads/Test Pretty Event - Ad Mon.tsv";
71
+ // if (string.IsNullOrEmpty(path)) return;
72
+ //
73
+ //
74
+ // Debug.Log(path);
75
+ // string text = File.ReadAllText(path);
76
+ // var lines = Amanotes.Klavar.TSVParser
77
+ // .Parse<KlavarEventLine>(text)
78
+ // .Where(line => !line.IsInvalid());
79
+ //
80
+ // var linesEvents = Chunk(lines, line => !string.IsNullOrEmpty(line.No));
81
+ // foreach (var linesEvent in linesEvents)
82
+ // {
83
+ // Debug.Log(linesEvent[0]);
84
+ // Debug.Log(linesEvent.Length);
85
+ //
86
+ // var linesParams = Chunk(lines, line => !string.IsNullOrEmpty(line.EventParameterName));
87
+ //
88
+ // }
89
+ // }
90
+ // }
91
+ // }
92
+ // #endif
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 4dc125edcd6594383a73b65b72442585
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,58 @@
1
+ using System;
2
+ using System.Linq;
3
+ using System.Text.RegularExpressions;
4
+
5
+
6
+ namespace Amanotes.Core
7
+ {
8
+ /// <summary>
9
+ /// Convert string to some famous case
10
+ /// https://dev.to/ankitmalikg/difference-among-casings-snake-case-vs-camel-case-vs-pascal-case-vs-kebab-case-2m8b#:~:text=Pascal%20Case%20is%20similar%20to,C%23%2C%20Java%2C%20and%20TypeScript.
11
+ /// </summary>
12
+ internal class KlavarEventUtils
13
+ {
14
+ private static readonly char[] delimiters = { '-', '_', ' ' };
15
+ // private static readonly string delimiters = "_- ";
16
+ public static string[] ToTokens(string text)
17
+ {
18
+ text = Regex.Replace(text, "([A-Z])", " $1");
19
+ var tokens = text.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
20
+ return tokens;
21
+ }
22
+
23
+
24
+ public static string ToLowerCase(string text) => text.ToLower();
25
+
26
+ public static string ToUpperCase(string text) => text.ToUpper();
27
+
28
+ /// <summary>
29
+ /// Convert string to SnakeCase
30
+ /// </summary>
31
+ /// <param name="text"></param>
32
+ /// <returns></returns>
33
+ public static string ToSnakeCase(string text)
34
+ {
35
+ var tokens = ToTokens(text);
36
+ return string.Join("_", tokens.Select(t => t.ToLower()));
37
+ }
38
+
39
+ public static string ToCamelCase(string text)
40
+ {
41
+ var tokens = ToTokens(text);
42
+ return string.Join("", tokens.Select(t => Char.ToUpper(t[0]) + t.Substring(1).ToLower()));
43
+ }
44
+
45
+ public static string ToPascalCase(string text)
46
+ {
47
+ var tokens = ToTokens(text);
48
+ return string.Join("", tokens.Select((t, i) =>
49
+ (i == 0 ? Char.ToLower(t[0]) : Char.ToUpper(t[0])) + t.Substring(1).ToLower()));
50
+ }
51
+
52
+ public static string ToKebabCase(string text)
53
+ {
54
+ var tokens = ToTokens(text);
55
+ return string.Join("-", tokens.Select(t => t.ToLower()));
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: f0ef1f5f6bb274056b4b47df1a473529
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 5c409fb968e8e4ed0a49083934f184d6
2
+ guid: 5b981038cfa6f4ec2a7dd96f58fde6cd
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.amanotes.gdk",
3
- "version": "0.2.47",
3
+ "version": "0.2.49",
4
4
  "displayName": "AmaGDK",
5
5
  "description": "Amanotes Game Development Kit",
6
6
  "unity": "2019.4",