diff --git a/SingularSDK/Runtime/SingularSDK.asmdef b/SingularSDK/Runtime/SingularSDK.asmdef index 1b0d872..a0769b4 100644 --- a/SingularSDK/Runtime/SingularSDK.asmdef +++ b/SingularSDK/Runtime/SingularSDK.asmdef @@ -1,6 +1,9 @@ { "name": "SingularSDK", - "references": [], + "rootNamespace": "", + "references": [ + "UnityEngine.Purchasing" + ], "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/SingularSDK/Runtime/SingularSDK.cs b/SingularSDK/Runtime/SingularSDK.cs index 7ded107..374a693 100644 --- a/SingularSDK/Runtime/SingularSDK.cs +++ b/SingularSDK/Runtime/SingularSDK.cs @@ -3,11 +3,10 @@ using System.Collections.Generic; using System.Globalization; using System.Runtime.InteropServices; +using System.Text.RegularExpressions; using Newtonsoft.Json; using UnityEngine; -#if UNITY_5_3_OR_NEWER && UNITY_PURCHASING using UnityEngine.Purchasing; -#endif namespace Singular { @@ -26,7 +25,7 @@ public class SingularSDK : MonoBehaviour private static bool Initialized = false; private const string UNITY_WRAPPER_NAME = "Unity"; - private const string UNITY_VERSION = "5.1.1"; + private const string UNITY_VERSION = "5.1.2"; // ios-only: [Obsolete] @@ -1136,9 +1135,9 @@ private void SingularSdidReceived(string result) } #endregion // end sdid - -#if UNITY_5_3_OR_NEWER && UNITY_PURCHASING +#region IAP + public static void InAppPurchase(IEnumerable products, Dictionary attributes, bool isRestored = false) { InAppPurchase("__iap__", products, attributes, isRestored); @@ -1285,7 +1284,8 @@ private static Dictionary BuildAndroidPurchaseAttributes(Product } #endif -#endif + #endregion // end region IAP + public static void Revenue(string currency, double amount) { if (Application.isEditor) diff --git a/package.json b/package.json index de96175..b38fd29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "singular-unity-package", - "version": "5.1.1", + "version": "5.1.2", "displayName": "Singular", "description": "Singular Unity Package", "type": "library",