diff --git a/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs b/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs new file mode 100644 index 00000000..0bdda960 --- /dev/null +++ b/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs @@ -0,0 +1,136 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; +using UnityEngine; +using System; + +namespace AppsFlyerSDK +{ + + public class AppsFlyerPurchaseConnector : MonoBehaviour { + + +#if UNITY_ANDROID && !UNITY_EDITOR + private static AndroidJavaClass appsFlyerAndroidConnector = new AndroidJavaClass("com.appsflyer.unity.AppsFlyerAndroidWrapper"); +#endif + + public static void init(MonoBehaviour unityObject, Store s) { +#if UNITY_IOS && !UNITY_EDITOR + _initPurchaseConnector(unityObject.name); +#elif UNITY_ANDROID && !UNITY_EDITOR + int store = mapStoreToInt(s); + appsFlyerAndroidConnector.CallStatic("initPurchaseConnector", unityObject ? unityObject.name : null, store); +#endif + } + + public static void build() { +#if UNITY_IOS && !UNITY_EDITOR + //not for iOS +#elif UNITY_ANDROID && !UNITY_EDITOR + appsFlyerAndroidConnector.CallStatic("build"); + +#else +#endif + } + + public static void startObservingTransactions() { +#if UNITY_IOS && !UNITY_EDITOR + _startObservingTransactions(); +#elif UNITY_ANDROID && !UNITY_EDITOR + appsFlyerAndroidConnector.CallStatic("startObservingTransactions"); +#else +#endif + } + + public static void stopObservingTransactions() { +#if UNITY_IOS && !UNITY_EDITOR + _stopObservingTransactions(); +#elif UNITY_ANDROID && !UNITY_EDITOR + appsFlyerAndroidConnector.CallStatic("stopObservingTransactions"); +#else +#endif + } + + public static void setIsSandbox(bool isSandbox) { +#if UNITY_IOS && !UNITY_EDITOR + _setIsSandbox(isSandbox); +#elif UNITY_ANDROID && !UNITY_EDITOR + appsFlyerAndroidConnector.CallStatic("setIsSandbox", isSandbox); +#else +#endif + } + + public static void setPurchaseRevenueValidationListeners(bool enableCallbacks) { +#if UNITY_IOS && !UNITY_EDITOR + _setPurchaseRevenueDelegate(); +#elif UNITY_ANDROID && !UNITY_EDITOR + appsFlyerAndroidConnector.CallStatic("setPurchaseRevenueValidationListeners", enableCallbacks); +#else +#endif + } + + public static void setAutoLogPurchaseRevenue(params AppsFlyerAutoLogPurchaseRevenueOptions[] autoLogPurchaseRevenueOptions) { +#if UNITY_IOS && !UNITY_EDITOR + int option = 0; + foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) { + option = option | (int)op; + } + _setAutoLogPurchaseRevenue(option); +#elif UNITY_ANDROID && !UNITY_EDITOR + if (autoLogPurchaseRevenueOptions.Length == 0) { + return; + } + foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) { + switch(op) { + case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsDisabled: + break; + case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions: + appsFlyerAndroidConnector.CallStatic("setAutoLogSubscriptions", true); + break; + case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases: + appsFlyerAndroidConnector.CallStatic("setAutoLogInApps", true); + break; + default: + break; + } + } +#else +#endif + } + + private static int mapStoreToInt(Store s) { + switch(s) { + case(Store.GOOGLE): + return 0; + default: + return -1; + } + } + +#if UNITY_IOS && !UNITY_EDITOR + + [DllImport("__Internal")] + private static extern void _startObservingTransactions(); + [DllImport("__Internal")] + private static extern void _stopObservingTransactions(); + [DllImport("__Internal")] + private static extern void _setIsSandbox(bool isSandbox); + [DllImport("__Internal")] + private static extern void _setPurchaseRevenueDelegate(); + [DllImport("__Internal")] + private static extern void _setAutoLogPurchaseRevenue(int option); + [DllImport("__Internal")] + private static extern void _initPurchaseConnector(string objectName); + +#endif + } + public enum Store { + GOOGLE = 0 + } + public enum AppsFlyerAutoLogPurchaseRevenueOptions + { + AppsFlyerAutoLogPurchaseRevenueOptionsDisabled = 0, + AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions = 1 << 0, + AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases = 1 << 1 + } + +} \ No newline at end of file diff --git a/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs.meta b/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs.meta new file mode 100644 index 00000000..f79071a4 --- /dev/null +++ b/Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 0636ea07d370d437183f3762280c08ce \ No newline at end of file diff --git a/Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml b/Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml index 04188cc3..668e3e38 100644 --- a/Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml +++ b/Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml @@ -2,17 +2,15 @@ - - - - - - + + + + - - + + diff --git a/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs b/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs new file mode 100644 index 00000000..73591a3e --- /dev/null +++ b/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs @@ -0,0 +1,8 @@ +namespace AppsFlyerSDK +{ + public interface IAppsFlyerPurchaseValidation + { + void didReceivePurchaseRevenueValidationInfo(string validationInfo); + void didReceivePurchaseRevenueError(string error); + } +} \ No newline at end of file diff --git a/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs.meta b/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs.meta new file mode 100644 index 00000000..6053a4f0 --- /dev/null +++ b/Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7c60f499ae0d048b1be8ffd6878a184c \ No newline at end of file diff --git a/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h b/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h index d4cd3c3d..f684d7e0 100644 --- a/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h +++ b/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h @@ -13,8 +13,13 @@ #else #import "AppsFlyerLib.h" #endif +#if __has_include() +#import +#else +#import "PurchaseConnector.h" +#endif -@interface AppsFlyeriOSWarpper : NSObject +@interface AppsFlyeriOSWarpper : NSObject + (BOOL) didCallStart; + (void) setDidCallStart:(BOOL)val; @end @@ -48,3 +53,7 @@ static NSString* startRequestObjectName = @""; static NSString* inAppRequestObjectName = @""; static NSString* onDeeplinkingObjectName = @""; +static const char* PURCHASE_REVENUE_VALIDATION_CALLBACK = "didReceivePurchaseRevenueValidationInfo"; +static const char* PURCHASE_REVENUE_ERROR_CALLBACK = "didReceivePurchaseRevenueError"; + +static NSString* onPurchaseValidationObjectName = @""; diff --git a/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm b/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm index 8d91cc56..837f796d 100644 --- a/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm +++ b/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm @@ -332,6 +332,38 @@ const void _disableIDFVCollection(bool isDisabled) { [AppsFlyerLib shared].disableIDFVCollection = isDisabled; } + // Purchase connector + const void _startObservingTransactions() { + [[PurchaseConnector shared] startObservingTransactions]; + } + + const void _stopObservingTransactions() { + [[PurchaseConnector shared] stopObservingTransactions]; + } + + const void _setIsSandbox(bool isSandBox) { + [[PurchaseConnector shared] setIsSandbox:isSandBox]; + } + + const void _setPurchaseRevenueDelegate() { + if (_AppsFlyerdelegate== nil) { + _AppsFlyerdelegate = [[AppsFlyeriOSWarpper alloc] init]; + } + [[PurchaseConnector shared] setPurchaseRevenueDelegate:_AppsFlyerdelegate]; + } + + const void _setAutoLogPurchaseRevenue(int option) { + [[PurchaseConnector shared] setAutoLogPurchaseRevenue:option]; + + } + + const void _initPurchaseConnector(const char* objectName) { + if (_AppsFlyerdelegate == nil) { + _AppsFlyerdelegate = [[AppsFlyeriOSWarpper alloc] init]; + } + onPurchaseValidationObjectName = stringFromChar(objectName); + } + } @implementation AppsFlyeriOSWarpper @@ -373,5 +405,14 @@ - (void)didResolveDeepLink:(AppsFlyerDeepLinkResult *)result{ unityCallBack(onDeeplinkingObjectName, ON_DEEPLINKING, stringFromdictionary(dict)); } +// Purchase Connector +- (void)didReceivePurchaseRevenueValidationInfo:(NSDictionary *)validationInfo error:(NSError *)error { + if (error != nil) { + unityCallBack(onPurchaseValidationObjectName, PURCHASE_REVENUE_ERROR_CALLBACK, [[error localizedDescription] UTF8String]); + } else { + unityCallBack(onPurchaseValidationObjectName, PURCHASE_REVENUE_VALIDATION_CALLBACK, stringFromdictionary(validationInfo)); + } +} + @end diff --git a/ProjectSettings/MultiplayerManager.asset b/ProjectSettings/MultiplayerManager.asset new file mode 100644 index 00000000..2a936644 --- /dev/null +++ b/ProjectSettings/MultiplayerManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!655991488 &1 +MultiplayerManager: + m_ObjectHideFlags: 0 + m_EnableMultiplayerRoles: 0 + m_StrippingTypes: {} diff --git a/ProjectSettings/boot.config b/ProjectSettings/boot.config deleted file mode 100644 index e69de29b..00000000 diff --git a/UserSettings/Layouts/default-6000.dwlt b/UserSettings/Layouts/default-6000.dwlt new file mode 100644 index 00000000..34cba5ff --- /dev/null +++ b/UserSettings/Layouts/default-6000.dwlt @@ -0,0 +1,1380 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 2250 + y: 247 + width: 1256 + height: 724 + m_ShowMode: 0 + m_Title: Package Manager + m_RootView: {fileID: 4} + m_MinSize: {x: 748, y: 276} + m_MaxSize: {x: 4000, y: 4026} + m_Maximized: 0 +--- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 1792 + y: -153 + width: 2560 + height: 1333 + m_ShowMode: 4 + m_Title: Project + m_RootView: {fileID: 9} + m_MinSize: {x: 875, y: 300} + m_MaxSize: {x: 10000, y: 10000} + m_Maximized: 1 +--- !u!114 &3 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: PackageManagerWindow + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1256 + height: 724 + m_MinSize: {x: 748, y: 276} + m_MaxSize: {x: 4000, y: 4026} + m_ActualView: {fileID: 15} + m_Panes: + - {fileID: 15} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &4 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 3} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1256 + height: 724 + m_MinSize: {x: 748, y: 276} + m_MaxSize: {x: 4000, y: 4026} + vertical: 0 + controlID: 14 + draggingID: 0 +--- !u!114 &5 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 12} + - {fileID: 6} + m_Position: + serializedVersion: 2 + x: 0 + y: 36 + width: 2560 + height: 1277 + m_MinSize: {x: 300, y: 100} + m_MaxSize: {x: 24288, y: 16192} + vertical: 0 + controlID: 50 + draggingID: 0 +--- !u!114 &6 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 2039 + y: 0 + width: 521 + height: 1277 + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 18} + m_Panes: + - {fileID: 18} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &7 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 504 + height: 772 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 19} + m_Panes: + - {fileID: 19} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ProjectBrowser + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 772 + width: 2039 + height: 505 + m_MinSize: {x: 231, y: 276} + m_MaxSize: {x: 10001, y: 10026} + m_ActualView: {fileID: 17} + m_Panes: + - {fileID: 17} + - {fileID: 22} + m_Selected: 0 + m_LastSelected: 1 +--- !u!114 &9 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 10} + - {fileID: 5} + - {fileID: 11} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2560 + height: 1333 + m_MinSize: {x: 875, y: 300} + m_MaxSize: {x: 10000, y: 10000} + m_UseTopView: 1 + m_TopViewHeight: 36 + m_UseBottomView: 1 + m_BottomViewHeight: 20 +--- !u!114 &10 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2560 + height: 36 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} + m_LastLoadedLayoutName: +--- !u!114 &11 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 1313 + width: 2560 + height: 20 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} +--- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 13} + - {fileID: 8} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2039 + height: 1277 + m_MinSize: {x: 200, y: 100} + m_MaxSize: {x: 16192, y: 16192} + vertical: 1 + controlID: 51 + draggingID: 0 +--- !u!114 &13 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 7} + - {fileID: 14} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2039 + height: 772 + m_MinSize: {x: 200, y: 50} + m_MaxSize: {x: 16192, y: 8096} + vertical: 0 + controlID: 42 + draggingID: 0 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 504 + y: 0 + width: 1535 + height: 772 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 20} + m_Panes: + - {fileID: 20} + - {fileID: 21} + - {fileID: 16} + m_Selected: 0 + m_LastSelected: 1 +--- !u!114 &15 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13953, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 748, y: 250} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Package Manager + m_Image: {fileID: -2824328813065806953, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Package Manager\u200B" + m_Pos: + serializedVersion: 2 + x: 2250 + y: 247 + width: 1256 + height: 698 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 +--- !u!114 &16 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12111, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 400, y: 100} + m_MaxSize: {x: 2048, y: 2048} + m_TitleContent: + m_Text: Asset Store + m_Image: {fileID: -8693916549880196297, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Asset Store\u200B" + m_Pos: + serializedVersion: 2 + x: 468 + y: 181 + width: 973 + height: 501 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 230, y: 250} + m_MaxSize: {x: 10000, y: 10000} + m_TitleContent: + m_Text: Project + m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Project\u200B" + m_Pos: + serializedVersion: 2 + x: 1792 + y: 655 + width: 2038 + height: 479 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 + m_SearchFilter: + m_NameFilter: + m_ClassNames: [] + m_AssetLabels: [] + m_AssetBundleNames: [] + m_ReferencingInstanceIDs: + m_SceneHandles: + m_ShowAllHits: 0 + m_SkipHidden: 0 + m_SearchArea: 1 + m_Folders: + - Packages + m_Globs: [] + m_ProductIds: + m_AnyWithAssetOrigin: 0 + m_OriginalText: + m_ImportLogFlags: 0 + m_FilterByTypeIntersection: 0 + m_ViewMode: 1 + m_StartGridSize: 64 + m_LastFolders: + - Packages + m_LastFoldersGridSize: -1 + m_LastProjectPath: /Users/veronicabelyakov/Applications/appsflyer-unity-plugin + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: ffffff7f + m_LastClickedID: 2147483647 + m_ExpandedIDs: 000000007049000000ca9a3bffffff7f + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_TrimLeadingAndTrailingWhitespace: 0 + m_ClientGUIView: {fileID: 8} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_AssetTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_TrimLeadingAndTrailingWhitespace: 0 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_ListAreaState: + m_SelectedInstanceIDs: + m_LastClickedInstanceID: 0 + m_HadKeyboardFocusLastEvent: 0 + m_ExpandedInstanceIDs: c6230000 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_TrimLeadingAndTrailingWhitespace: 0 + m_ClientGUIView: {fileID: 0} + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_NewAssetIndexInList: -1 + m_ScrollPosition: {x: 0, y: 0} + m_GridSize: 64 + m_SkipHiddenPackages: 0 + m_DirectoriesAreaWidth: 246 +--- !u!114 &18 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Inspector\u200B" + m_Pos: + serializedVersion: 2 + x: 3831 + y: -117 + width: 520 + height: 1251 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_PreviewResizer: + m_CachedPref: 160 + m_ControlHash: -371814159 + m_PrefName: Preview_InspectorPreview + m_LastInspectedObjectInstanceID: -1 + m_LastVerticalScrollValue: 0 + m_GlobalObjectId: + m_InspectorMode: 0 + m_LockTracker: + m_IsLocked: 0 + m_PreviewWindow: {fileID: 0} +--- !u!114 &19 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Hierarchy + m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Hierarchy\u200B" + m_Pos: + serializedVersion: 2 + x: 1792 + y: -117 + width: 503 + height: 746 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 + m_SceneHierarchy: + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: b6f1ffff + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_TrimLeadingAndTrailingWhitespace: 0 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_ExpandedScenes: [] + m_CurrenRootInstanceID: 0 + m_LockTracker: + m_IsLocked: 0 + m_CurrentSortingName: TransformSorting + m_WindowGUID: 9a5ee93bb0e91428facd2b3497f49068 +--- !u!114 &20 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Scene + m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Scene\u200B" + m_Pos: + serializedVersion: 2 + x: 2296 + y: -117 + width: 1533 + height: 746 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: + - dockPosition: 0 + containerId: overlay-toolbar__top + displayed: 1 + id: Tool Settings + index: 0 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-24.0,"y":-24.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: -24, y: -24} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 3 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-toolbar__top + displayed: 1 + id: unity-grid-and-snap-toolbar + index: 1 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-141.0,"y":149.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":1,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: -141, y: 149} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 1 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-toolbar__top + displayed: 1 + id: unity-scene-view-toolbar + index: 0 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":24.0,"y":0.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 24, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-toolbar__top + displayed: 0 + id: unity-search-toolbar + index: 1 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":-24.0,"y":0.0},"m_FloatingSnapCorner":1,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: -24, y: 0} + snapCorner: 1 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-toolbar__top + displayed: 0 + id: Scene View/Open Tile Palette + index: 2 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-toolbar__top + displayed: 0 + id: Scene View/Tilemap Focus + index: 3 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-container--left + displayed: 1 + id: unity-transform-toolbar + index: 0 + contents: '{"m_Layout":2,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":24.0,"y":0.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 24, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 2 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-container--right + displayed: 1 + id: Orientation + index: 0 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":67.5,"y":86.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 67.5, y: 86} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Light Settings + index: 0 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Camera + index: 1 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Cloth Constraints + index: 1 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Cloth Collisions + index: 2 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Navmesh Display + index: 4 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Agent Display + index: 5 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Obstacle Display + index: 6 + contents: + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Occlusion Culling + index: 3 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Physics Debugger + index: 4 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Scene Visibility + index: 5 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/Particles + index: 6 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-toolbar__top + displayed: 0 + id: Brush Attributes + index: 2 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-toolbar__top + displayed: 1 + id: unity-scene-view-camera-mode-toolbar + index: 2 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":24.0,"y":0.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 24, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-toolbar__left + displayed: 0 + id: Terrain Tools + index: 0 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 0 + containerId: overlay-toolbar__left + displayed: 0 + id: Brush Masks + index: 1 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--left + displayed: 0 + id: Scene View/Lighting Visualization Colors + index: 0 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--left + displayed: 1 + id: Overlays/OverlayMenu + index: 1 + contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":24.0,"y":0.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 24, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + layout: 1 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: SceneView/CamerasOverlay + index: 7 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/PBR Validation Settings + index: 8 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + - dockPosition: 1 + containerId: overlay-container--right + displayed: 0 + id: Scene View/TrailRenderer + index: 9 + contents: '{"m_Layout":4,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":24.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}' + floating: 0 + collapsed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 24, y: 0} + snapCorner: 0 + layout: 4 + size: {x: 0, y: 0} + sizeOverridden: 0 + m_ContainerData: + - containerId: overlay-toolbar__top + scrollOffset: 0 + - containerId: overlay-toolbar__left + scrollOffset: 0 + - containerId: overlay-container--left + scrollOffset: 0 + - containerId: overlay-container--right + scrollOffset: 0 + - containerId: overlay-toolbar__right + scrollOffset: 0 + - containerId: overlay-toolbar__bottom + scrollOffset: 0 + - containerId: Floating + scrollOffset: 0 + m_OverlaysVisible: 1 + m_WindowGUID: 1acd90b02262845b2a933768b9dd2124 + m_Gizmos: 1 + m_OverrideSceneCullingMask: 6917529027641081856 + m_SceneIsLit: 1 + m_SceneLighting: 1 + m_2DMode: 0 + m_isRotationLocked: 0 + m_PlayAudio: 0 + m_AudioPlay: 0 + m_DebugDrawModesUseInteractiveLightBakingData: 0 + m_Position: + m_Target: {x: 0, y: 0, z: 0} + speed: 2 + m_Value: {x: 0, y: 0, z: 0} + m_RenderMode: 0 + m_CameraMode: + drawMode: 0 + name: Shaded + section: Shading Mode + m_ValidateTrueMetals: 0 + m_DoValidateTrueMetals: 0 + m_SceneViewState: + m_AlwaysRefresh: 0 + showFog: 1 + showSkybox: 1 + showFlares: 1 + showImageEffects: 1 + showParticleSystems: 1 + showVisualEffectGraphs: 1 + m_FxEnabled: 1 + m_Grid: + xGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + yGrid: + m_Fade: + m_Target: 1 + speed: 2 + m_Value: 1 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 1, y: 1} + zGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + m_ShowGrid: 1 + m_GridAxis: 1 + m_gridOpacity: 0.5 + m_Rotation: + m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + speed: 2 + m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + m_Size: + m_Target: 10 + speed: 2 + m_Value: 10 + m_Ortho: + m_Target: 0 + speed: 2 + m_Value: 0 + m_CameraSettings: + m_Speed: 1 + m_SpeedNormalized: 0.5 + m_SpeedMin: 0.01 + m_SpeedMax: 2 + m_EasingEnabled: 1 + m_EasingDuration: 0.4 + m_AccelerationEnabled: 1 + m_FieldOfViewHorizontalOrVertical: 60 + m_NearClip: 0.03 + m_FarClip: 10000 + m_DynamicClip: 1 + m_OcclusionCulling: 0 + m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} + m_LastSceneViewOrtho: 0 + m_Viewpoint: + m_SceneView: {fileID: 20} + m_CameraOverscanSettings: + m_Opacity: 50 + m_Scale: 1 + m_ReplacementShader: {fileID: 0} + m_ReplacementString: + m_SceneVisActive: 1 + m_LastLockedObject: {fileID: 0} + m_LastDebugDrawMode: 35 + m_ViewIsLockedToObject: 0 +--- !u!114 &21 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Game + m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Game\u200B" + m_Pos: + serializedVersion: 2 + x: 507 + y: 94 + width: 1532 + height: 790 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 + m_SerializedViewNames: [] + m_SerializedViewValues: [] + m_PlayModeViewName: GameView + m_ShowGizmos: 0 + m_TargetDisplay: 0 + m_ClearColor: {r: 0, g: 0, b: 0, a: 0} + m_TargetSize: {x: 1532, y: 769} + m_TextureFilterMode: 0 + m_TextureHideFlags: 61 + m_RenderIMGUI: 0 + m_EnterPlayModeBehavior: 0 + m_UseMipMap: 0 + m_VSyncEnabled: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -766 + m_HBaseRangeMax: 766 + m_VBaseRangeMin: -384.5 + m_VBaseRangeMax: 384.5 + m_HAllowExceedBaseRangeMin: 1 + m_HAllowExceedBaseRangeMax: 1 + m_VAllowExceedBaseRangeMin: 1 + m_VAllowExceedBaseRangeMax: 1 + m_ScaleWithWindow: 0 + m_HSlider: 0 + m_VSlider: 0 + m_IgnoreScrollWheelUntilClicked: 0 + m_EnableMouseInput: 1 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 21 + width: 1532 + height: 769 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 766, y: 384.5} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -766 + y: -384.5 + width: 1532 + height: 769 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1532, y: 790} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 00000000000000000000 + m_XRRenderMode: 0 + m_RenderTexture: {fileID: 0} + m_showToolbar: 1 +--- !u!114 &22 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Console + m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_TextWithWhitespace: "Console\u200B" + m_Pos: + serializedVersion: 2 + x: 1792 + y: 655 + width: 2038 + height: 479 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ContainerData: [] + m_OverlaysVisible: 1 diff --git a/UserSettings/Search.settings b/UserSettings/Search.settings new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/UserSettings/Search.settings @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/android-unity-wrapper/app/build.gradle b/android-unity-wrapper/app/build.gradle index 7492e611..c8558cde 100644 --- a/android-unity-wrapper/app/build.gradle +++ b/android-unity-wrapper/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 29 - + compileSdkVersion 34 + namespace 'com.appsflyer.unitywrapper' defaultConfig { applicationId "com.appsflyer.unitywrapper" minSdkVersion 16 - targetSdkVersion 29 + targetSdkVersion 34 versionCode 1 versionName "1.0" diff --git a/android-unity-wrapper/app/src/main/AndroidManifest.xml b/android-unity-wrapper/app/src/main/AndroidManifest.xml index fdd692cf..19929d3d 100644 --- a/android-unity-wrapper/app/src/main/AndroidManifest.xml +++ b/android-unity-wrapper/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - pom.groupId = GROUP - pom.artifactId = POM_ARTIFACT_ID - pom.version = VERSION_NAME - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: ossrhUsername, password: ossrhPassword) - } - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: ossrhUsername, password: ossrhPassword) - } - pom.project { - name POM_NAME - packaging POM_PACKAGING - description POM_DESCRIPTION - url POM_URL - scm { - url POM_SCM_URL - connection POM_SCM_CONNECTION - developerConnection POM_SCM_DEV_CONNECTION - } +def getReleaseRepositoryUrl() { + return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL + : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" +} + +def getSnapshotRepositoryUrl() { + return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL + : "https://oss.sonatype.org/content/repositories/snapshots/" +} + +android { + publishing { + singleVariant("release") { + // if you don't want sources/javadoc, remove these lines + withJavadocJar() + } + } +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + // The coordinates of the library + groupId = GROUP + artifactId = POM_ARTIFACT_ID + version = VERSION_NAME + + // Artifacts to publish + artifact("$buildDir/outputs/aar/${project.name}-release.aar") + + // Configure POM metadata + pom { + name.set(POM_NAME) + description.set(POM_DESCRIPTION) + url.set(POM_URL) + licenses { license { - name POM_LICENCE_NAME - url POM_LICENCE_URL - distribution POM_LICENCE_DIST + name.set(POM_LICENCE_NAME) + url.set(POM_LICENCE_URL) + distribution.set(POM_LICENCE_DIST) } } + developers { developer { - id POM_DEVELOPER_ID - name POM_DEVELOPER_NAME + id.set(POM_DEVELOPER_ID) + name.set(POM_DEVELOPER_NAME) } } + + scm { + connection.set(POM_SCM_CONNECTION) + developerConnection.set(POM_SCM_DEV_CONNECTION) + url.set(POM_SCM_URL) + } + } + + // Add dependencies to the POM + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + configurations.implementation.allDependencies.each { dependency -> + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', dependency.group ?: '') + dependencyNode.appendNode('artifactId', dependency.name) + dependencyNode.appendNode('version', dependency.version ?: '') + } } } } - } - signing { - required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } - sign configurations.archives - } - task androidJavadocs(type: Javadoc) { - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } + + repositories { + maven { + name = "sonatype" + url = isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl() + + credentials { + username = ossrhUsername + password = ossrhPassword + } } } } - task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - archiveClassifier = 'javadoc' - from androidJavadocs.destinationDir - } - task androidSourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.sourceFiles + + signing { + required { isReleaseBuild() && gradle.taskGraph.hasTask("publish") } + sign publishing.publications.release } - artifacts { archives androidJavadocsJar } +// task androidJavadocs(type: Javadoc) { +// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +// if (JavaVersion.current().isJava8Compatible()) { +// allprojects { +// tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } +// } +// } +// } +// task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { +// archiveClassifier = 'javadoc' +// from androidJavadocs.destinationDir +// } +// task androidSourcesJar(type: Jar) { +// classifier = 'sources' +// from android.sourceSets.main.java.sourceFiles +// } +// artifacts { archives androidJavadocsJar } } \ No newline at end of file diff --git a/android-unity-wrapper/unitywrapper/src/main/AndroidManifest.xml b/android-unity-wrapper/unitywrapper/src/main/AndroidManifest.xml index 388ec10e..94cbbcfc 100644 --- a/android-unity-wrapper/unitywrapper/src/main/AndroidManifest.xml +++ b/android-unity-wrapper/unitywrapper/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java b/android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java index c55437e4..733739d8 100644 --- a/android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java +++ b/android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java @@ -1,7 +1,22 @@ package com.appsflyer.unity; +import android.annotation.SuppressLint; +import android.os.Build; +import android.util.Log; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; + +import com.appsflyer.api.InAppPurchaseEvent; +import com.appsflyer.api.PurchaseClient; +import com.appsflyer.api.Store; +import com.appsflyer.api.SubscriptionPurchaseEvent; +import com.appsflyer.internal.models.InAppPurchaseValidationResult; +import com.appsflyer.internal.models.ProductPurchase; +import com.appsflyer.internal.models.SubscriptionPurchase; +import com.appsflyer.internal.models.SubscriptionValidationResult; +import com.appsflyer.internal.models.ValidationFailureData; import com.appsflyer.AFAdRevenueData; import com.appsflyer.MediationNetwork; @@ -45,12 +60,19 @@ public class AppsFlyerAndroidWrapper { private static final String ON_DEEPLINKING = "onDeepLinking"; private static final String START_REQUEST_CALLBACK = "requestResponseReceived"; private static final String IN_APP_RESPONSE_CALLBACK = "inAppResponseReceived"; - private static final String PLUGIN_VERSION = "6.15.3"; + private static final String VALIDATION_CALLBACK = "didReceivePurchaseRevenueValidationInfo"; + private static final String ERROR_CALLBACK = "didReceivePurchaseRevenueError"; + private static final String PLUGIN_VERSION = "6.15.31"; private static final long DDL_TIMEOUT_DEFAULT = 3000; private static AppsFlyerConversionListener conversionListener; private static String devkey = ""; private static long ddlTimeout = DDL_TIMEOUT_DEFAULT; + private static PurchaseClient purchaseClientInstance; + private static PurchaseClient.Builder builder; + + private static String unityObjectName; + public static void initSDK(String devKey, String objectName) { if (conversionListener == null && objectName != null){ conversionListener = getConversionListener(objectName); @@ -492,4 +514,347 @@ public static void setPluginInfo() { public static void setDeepLinkTimeout(long deepLinkTimeout) { ddlTimeout = deepLinkTimeout; } + + + //Purchase Connector + public static void initPurchaseConnector(String objectName, int store) { + unityObjectName = objectName; + Store s = mappingEnum(store); + if (s != null) { + builder = new PurchaseClient.Builder(UnityPlayer.currentActivity, s); + } else { + Log.w("AppsFlyer_Connector", "[PurchaseConnector]: Please choose a valid store."); + } + } + + public static void build() { + if (builder != null) { + purchaseClientInstance = builder.build(); + } else { + Log.w("AppsFlyer_Connector", "[PurchaseConnector]: Initialization is required prior to building."); + } + } + + + public static void setIsSandbox(boolean isSandbox) { + if (builder != null) { + builder.setSandbox(isSandbox); + } + } + + public static void setAutoLogSubscriptions(boolean logSubscriptions) { + if (builder != null) { + builder.logSubscriptions(logSubscriptions); + } + } + + public static void setAutoLogInApps(boolean autoLogInApps) { + if (builder != null) { + builder.autoLogInApps(autoLogInApps); + } + } + + public static void setPurchaseRevenueValidationListeners(boolean enableCallbacks) { + if (builder != null && enableCallbacks) { + builder.setSubscriptionValidationResultListener(new PurchaseClient.SubscriptionPurchaseValidationResultListener() { + @RequiresApi(api = Build.VERSION_CODES.N) + @Override + public void onResponse(@Nullable Map result) { + if (unityObjectName != null) { + if (result == null) { + return; + } + result.forEach((k, v) -> { + Map map = new HashMap<>(); + Map mapSubscription = new HashMap<>(); + + map.put("productId", k); + map.put("success", v.getSuccess() ? "true" : "false"); + if (v.getSuccess()) { + SubscriptionPurchase subscriptionPurchase = v.getSubscriptionPurchase(); + Map mapCancelSurveyResult = new HashMap<>(); + if (subscriptionPurchase.getCanceledStateContext() != null) { + Map mapCanceledStateContext = new HashMap<>(); + Map mapUserInitiatedCancellation = new HashMap<>(); + if (subscriptionPurchase.getCanceledStateContext(). + getUserInitiatedCancellation() != null) { + if (subscriptionPurchase.getCanceledStateContext(). + getUserInitiatedCancellation(). + getCancelSurveyResult() != null) { + mapCancelSurveyResult.put("reason", + subscriptionPurchase.getCanceledStateContext(). + getUserInitiatedCancellation(). + getCancelSurveyResult().getReason()); + mapCancelSurveyResult.put("reasonUserInput", + subscriptionPurchase.getCanceledStateContext(). + getUserInitiatedCancellation(). + getCancelSurveyResult().getReasonUserInput()); + mapUserInitiatedCancellation.put("cancelSurveyResult", + mapCancelSurveyResult); + } + mapUserInitiatedCancellation.put("cancelTime", + subscriptionPurchase.getCanceledStateContext(). + getUserInitiatedCancellation().getCancelTime()); + } + mapCanceledStateContext.put("developerInitiatedCancellation", + null); + mapCanceledStateContext.put("replacementCancellation", + null); + mapCanceledStateContext.put("systemInitiatedCancellation", + null); + mapCanceledStateContext.put("userInitiatedCancellation", + mapUserInitiatedCancellation); + } + if (subscriptionPurchase.getExternalAccountIdentifiers() != null) { + Map mapExternalAccountIdentifiers = new HashMap<>(); + mapExternalAccountIdentifiers.put("externalAccountId", + subscriptionPurchase.getExternalAccountIdentifiers(). + getExternalAccountId()); + mapExternalAccountIdentifiers.put("obfuscatedExternalAccountId", + subscriptionPurchase.getExternalAccountIdentifiers(). + getObfuscatedExternalAccountId()); + mapExternalAccountIdentifiers.put("obfuscatedExternalProfileId", + subscriptionPurchase.getExternalAccountIdentifiers(). + getObfuscatedExternalProfileId()); + mapSubscription.put("externalAccountIdentifiers", + mapExternalAccountIdentifiers); + } + if (subscriptionPurchase.getPausedStateContext() != null) { + Map mapPausedStateContext = new HashMap<>(); + mapPausedStateContext.put("autoResumeTime", + subscriptionPurchase.getPausedStateContext(). + getAutoResumeTime()); + mapSubscription.put("pausedStateContext", mapPausedStateContext); + + + } + if (subscriptionPurchase.getSubscribeWithGoogleInfo() != null) { + Map mapSubscribeWithGoogleInfo = new HashMap<>(); + mapSubscribeWithGoogleInfo.put("emailAddress", + subscriptionPurchase.getSubscribeWithGoogleInfo().getEmailAddress()); + mapSubscribeWithGoogleInfo.put("familyName", + subscriptionPurchase.getSubscribeWithGoogleInfo().getFamilyName()); + mapSubscribeWithGoogleInfo.put("givenName", + subscriptionPurchase.getSubscribeWithGoogleInfo().getGivenName()); + mapSubscribeWithGoogleInfo.put("profileId", + subscriptionPurchase.getSubscribeWithGoogleInfo().getProfileId()); + mapSubscribeWithGoogleInfo.put("profileName", + subscriptionPurchase.getSubscribeWithGoogleInfo().getProfileName()); + mapSubscription.put("subscribeWithGoogleInfo", + mapSubscribeWithGoogleInfo); + } + int sizeItems = subscriptionPurchase.getLineItems().size(); + Map[] lineItems = new Map[sizeItems]; + for (int i = 0; i < sizeItems; i++) { + Map mapSubscriptionPurchaseLineItem = new HashMap<>(); + mapSubscriptionPurchaseLineItem.put("expiryTime", + subscriptionPurchase.getLineItems().get(i).getExpiryTime()); + mapSubscriptionPurchaseLineItem.put("productId", + subscriptionPurchase.getLineItems().get(i).getProductId()); + if (subscriptionPurchase.getLineItems().get(i).getAutoRenewingPlan() + != null) { + Map mapAutoRenewingPlan = new HashMap<>(); + if (subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan().getAutoRenewEnabled() != null) { + mapAutoRenewingPlan.put("autoRenewEnabled", + subscriptionPurchase.getLineItems().get(i).getAutoRenewingPlan(). + getAutoRenewEnabled() ? "true" : "false"); + } + if (subscriptionPurchase.getLineItems().get(i).getAutoRenewingPlan(). + getPriceChangeDetails() != null) { + Map mapPriceChangeDetails = new HashMap<>(); + mapPriceChangeDetails.put("expectedNewPriceChargeTime", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan().getPriceChangeDetails(). + getExpectedNewPriceChargeTime()); + mapPriceChangeDetails.put("priceChangeMode", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan(). + getPriceChangeDetails().getPriceChangeMode()); + mapPriceChangeDetails.put("priceChangeState", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan(). + getPriceChangeDetails().getPriceChangeState()); + mapAutoRenewingPlan.put("priceChangeDetails", mapPriceChangeDetails); + if (subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan().getPriceChangeDetails(). + getNewPrice() != null) { + Map mapMoney = new HashMap<>(); + mapMoney.put("currencyCode", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan(). + getPriceChangeDetails().getNewPrice(). + getCurrencyCode()); + mapMoney.put("nanos", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan(). + getPriceChangeDetails().getNewPrice().getNanos()); + mapMoney.put("units", + subscriptionPurchase.getLineItems().get(i). + getAutoRenewingPlan(). + getPriceChangeDetails().getNewPrice().getUnits()); + mapPriceChangeDetails.put("newPrice", mapMoney); + } + } + mapSubscriptionPurchaseLineItem.put("autoRenewingPlan", mapAutoRenewingPlan); + } + if (subscriptionPurchase.getLineItems().get(i).getOfferDetails() != null) { + Map mapOfferDetails = new HashMap<>(); + mapOfferDetails.put("basePlanId", + subscriptionPurchase.getLineItems().get(i). + getOfferDetails().getBasePlanId()); + if (subscriptionPurchase.getLineItems().get(i). + getOfferDetails().getOfferId() != null) { + mapOfferDetails.put("offerId", + subscriptionPurchase.getLineItems().get(i). + getOfferDetails().getOfferId()); + } + mapSubscriptionPurchaseLineItem.put("offerDetails", mapOfferDetails); + + } + if (subscriptionPurchase.getLineItems().get(i).getDeferredItemReplacement() != null) { + Map mapDeferredItemReplacement = new HashMap<>(); + mapDeferredItemReplacement.put("productId", + subscriptionPurchase.getLineItems().get(i). + getDeferredItemReplacement().getProductId()); + mapSubscriptionPurchaseLineItem.put("deferredItemReplacement", + mapDeferredItemReplacement); + + } + if (subscriptionPurchase.getLineItems().get(i).getPrepaidPlan() != null + && subscriptionPurchase.getLineItems().get(i). + getPrepaidPlan().getAllowExtendAfterTime() != null) { + Map mapPrepaidPlan = new HashMap<>(); + mapPrepaidPlan.put("allowExtendAfterTime", + subscriptionPurchase.getLineItems().get(i). + getPrepaidPlan().getAllowExtendAfterTime()); + mapSubscriptionPurchaseLineItem.put("prepaidPlan", mapPrepaidPlan); + } + lineItems[i] = mapSubscriptionPurchaseLineItem; + } + mapSubscription.put("lineItems", lineItems); + mapSubscription.put("acknowledgementState", + subscriptionPurchase.getAcknowledgementState()); + mapSubscription.put("canceledStateContext", + subscriptionPurchase.getCanceledStateContext()); + mapSubscription.put("kind", + subscriptionPurchase.getKind()); + mapSubscription.put("latestOrderId", + subscriptionPurchase.getLatestOrderId()); + mapSubscription.put("linkedPurchaseToken", + subscriptionPurchase.getLinkedPurchaseToken()); + mapSubscription.put("regionCode", + subscriptionPurchase.getRegionCode()); + mapSubscription.put("subscriptionState", + subscriptionPurchase.getSubscriptionState()); + mapSubscription.put("testPurchase", null); + mapSubscription.put("startTime", + subscriptionPurchase.getStartTime()); + map.put("subscriptionPurchase", mapSubscription); + } else { + ValidationFailureData failureData = v.getFailureData(); + Map mapValidationFailureData = new HashMap<>(); + mapValidationFailureData.put("status", failureData.getStatus()); + mapValidationFailureData.put("description", failureData.getDescription()); + map.put("failureData", mapValidationFailureData); + } + JSONObject resultObject = new JSONObject(map); + UnityPlayer.UnitySendMessage(unityObjectName, VALIDATION_CALLBACK, + resultObject.toString()); + }); + } + } + + @Override + public void onFailure(@NonNull String result, @Nullable Throwable error) { + if (unityObjectName != null) { + UnityPlayer.UnitySendMessage(unityObjectName, ERROR_CALLBACK, result); + } + } + }); + + builder.setInAppValidationResultListener(new PurchaseClient.InAppPurchaseValidationResultListener() { + @SuppressLint("LongLogTag") + @RequiresApi(api = Build.VERSION_CODES.N) + @Override + public void onResponse(@Nullable Map result) { + if (unityObjectName != null) { + if (result == null) { + return; + } + result.forEach((k, v) -> { + Map map = new HashMap<>(); + Map mapIAP = new HashMap<>(); +// JSONObject jsonObject = new JSONObject(map); + map.put("token", k); + map.put("success", v.getSuccess() ? "true" : "false"); + if (v.getSuccess()) { + ProductPurchase productPurchase = v.getProductPurchase(); + + mapIAP.put("productId", productPurchase.getProductId()); + mapIAP.put("purchaseState", productPurchase.getPurchaseState()); + mapIAP.put("kind", productPurchase.getKind()); + mapIAP.put("purchaseTimeMillis", productPurchase.getPurchaseTimeMillis()); + mapIAP.put("consumptionState", productPurchase.getConsumptionState()); + mapIAP.put("developerPayload", productPurchase.getDeveloperPayload()); + mapIAP.put("orderId", productPurchase.getOrderId()); + mapIAP.put("purchaseType", productPurchase.getPurchaseType()); + mapIAP.put("acknowledgementState", productPurchase.getAcknowledgementState()); + mapIAP.put("purchaseToken", productPurchase.getPurchaseToken()); + mapIAP.put("quantity", productPurchase.getQuantity()); + mapIAP.put("obfuscatedExternalAccountId", productPurchase.getObfuscatedExternalAccountId()); + mapIAP.put("obfuscatedExternalProfileId", productPurchase.getObfuscatedExternalProfileId()); + mapIAP.put("regionCode", productPurchase.getRegionCode()); + + + map.put("productPurchase", mapIAP); + } else { + ValidationFailureData failureData = v.getFailureData(); + Map mapValidationFailureData = new HashMap<>(); + mapValidationFailureData.put("status", failureData.getStatus()); + mapValidationFailureData.put("description", failureData.getDescription()); + map.put("failureData", mapValidationFailureData); + } + + JSONObject resultObject = new JSONObject(map); + UnityPlayer.UnitySendMessage(unityObjectName, VALIDATION_CALLBACK, resultObject.toString()); + }); + } + } + + @Override + public void onFailure(@NonNull String result, @Nullable Throwable error) { + if (unityObjectName != null) { + UnityPlayer.UnitySendMessage(unityObjectName, ERROR_CALLBACK, result); + } + } + }); + } + } + + + public static void startObservingTransactions() { + if (purchaseClientInstance != null) { + purchaseClientInstance.startObservingTransactions(); + } else { + Log.w("AppsFlyer_Connector", "[PurchaseConnector]: startObservingTransactions was not called because the purchase client instance is null, please call build() prior to this function."); + } + } + + public static void stopObservingTransactions() { + if (purchaseClientInstance != null) { + purchaseClientInstance.stopObservingTransactions(); + } else { + Log.w("AppsFlyer_Connector", "[PurchaseConnector]: stopObservingTransactions was not called because the purchase client instance is null, please call build() prior to this function."); + } + } + + private static Store mappingEnum(int storeEnum) { + switch (storeEnum) { + case 0: + return Store.GOOGLE; + default: + return null; + } + } } diff --git a/appsflyer-unity-plugin-6.15.31.unitypackage b/appsflyer-unity-plugin-6.15.31.unitypackage new file mode 100644 index 00000000..0a89286f Binary files /dev/null and b/appsflyer-unity-plugin-6.15.31.unitypackage differ diff --git a/deploy/build_unity_package.sh b/deploy/build_unity_package.sh index f99d99d6..4c185ede 100644 --- a/deploy/build_unity_package.sh +++ b/deploy/build_unity_package.sh @@ -4,18 +4,18 @@ echo "Start Build for appsflyer-unity-plugin.unitypackage" DEPLOY_PATH=outputs UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity" -PACKAGE_NAME="appsflyer-unity-plugin-6.15.3.unitypackage" +PACKAGE_NAME="appsflyer-unity-plugin-6.15.31.unitypackage" mkdir -p $DEPLOY_PATH #move external dependency manager echo "moving the external dependency manager to root" -mv external-dependency-manager-1.2.177.unitypackage .. +mv external-dependency-manager-1.2.183.unitypackage .. # Build the .unitypackage -/Applications/Unity/Hub/Editor/2020.3.34f1/Unity.app/Contents/MacOS/Unity \ +/Applications/Unity/Hub/Editor/6000.1.0a7/Unity.app/Contents/MacOS/Unity \ -gvh_disable \ -batchmode \ --importPackage external-dependency-manager-1.2.177.unitypackage \ +-importPackage external-dependency-manager-1.2.183.unitypackage \ -nographics \ -logFile create_unity_core.log \ -projectPath $PWD/../ \ @@ -23,13 +23,13 @@ mv external-dependency-manager-1.2.177.unitypackage .. Assets \ $PWD/$DEPLOY_PATH/$PACKAGE_NAME \ -quit \ -&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.15.3.unitypackage" \ +&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.15.31.unitypackage" \ || echo "Failed to export package. See create_unity_core.log for more info." if [ $1 == "-p" ]; then echo "moving back the external dependency manager to deploy" -mv ../external-dependency-manager-1.2.177.unitypackage . +mv ../external-dependency-manager-1.2.183.unitypackage . echo "removing ./Library" rm -rf ../Library echo "removing ./Logs" diff --git a/deploy/external-dependency-manager-1.2.177.unitypackage b/deploy/external-dependency-manager-1.2.177.unitypackage deleted file mode 100644 index 7f9c1d80..00000000 Binary files a/deploy/external-dependency-manager-1.2.177.unitypackage and /dev/null differ diff --git a/deploy/external-dependency-manager-1.2.183.unitypackage b/deploy/external-dependency-manager-1.2.183.unitypackage new file mode 100644 index 00000000..d7a5a739 Binary files /dev/null and b/deploy/external-dependency-manager-1.2.183.unitypackage differ