diff --git a/Assets/Apple.Core.meta b/Assets/Apple.Core.meta deleted file mode 100644 index 895a21c..0000000 --- a/Assets/Apple.Core.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c2c6f8b30c7b34a0ba30c01e69b55191 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Apple.Core/Editor.meta b/Assets/Apple.Core/Editor.meta deleted file mode 100644 index 4ad2984..0000000 --- a/Assets/Apple.Core/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5e16f931f0abc47daa4431520af5c870 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset b/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset deleted file mode 100644 index 1d81ffe..0000000 --- a/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset +++ /dev/null @@ -1,97 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7856389972263248266 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: c6b8a8fe473224decaaecc9264d56e95, type: 3} - m_Name: AppleCoreBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 ---- !u!114 &-7691070408797182494 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 24e6011bb95664520aa4858e4c359e06, type: 3} - m_Name: AppleGameKitBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 ---- !u!114 &-2205427967527814593 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 88a319fb99484804b632ce9bbec4cf6d, type: 3} - m_Name: AppleSecurityBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 - AppSandboxEntitlement: 1 - AllowNetworkServer: 0 - AllowNetworkClient: 0 - AllowCamera: 0 - AllowMicrophone: 0 - AllowUsb: 0 - AllowPrint: 0 - AllowBluetooth: 0 - AllowAddressBook: 0 - AllowLocation: 0 - AllowCalendars: 0 - AllowUserSelectedReadOnly: 0 - AllowUserSelectedReadWrite: 0 - AllowDownloadsReadOnly: 0 - AllowDownloadsReadWrite: 0 - AllowPicturesReadOnly: 0 - AllowPicturesReadWrite: 0 - AllowMusicReadOnly: 0 - AllowMusicReadWrite: 0 - AllowMoviesReadOnly: 0 - AllowMoviesReadWrite: 0 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 6b2797781d18e4c5987f2acb206f9e7b, type: 3} - m_Name: DefaultAppleBuildProfile - m_EditorClassIdentifier: - AutomateInfoPlist: 1 - DefaultInfoPlist: {fileID: 0} - MinimumOSVersion_iOS: - MinimumOSVersion_tvOS: - MinimumOSVersion_macOS: - AppUsesNonExemptEncryption: 0 - AutomateEntitlements: 1 - DefaultEntitlements: {fileID: 0} ---- !u!114 &3409853982161678830 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: fe2e2f0820ab4779ac857f0e06bac5fb, type: 3} - m_Name: AppleUserManagementBuildStep - m_EditorClassIdentifier: - IsEnabled: 0 - AllowGetCurrentUser: 0 - AllowRunsAsCurrentUser: 0 diff --git a/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta b/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta deleted file mode 100644 index 9f265c2..0000000 --- a/Assets/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c52477ed04b854f209b38da633c4ac5a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta deleted file mode 100644 index ae0bc2f..0000000 --- a/Assets/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fc2c81795e24245d28d109bc024c13be -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android.meta b/Assets/Plugins/Android.meta deleted file mode 100644 index 404d5a8..0000000 --- a/Assets/Plugins/Android.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 42b06ecc04ff44b808f729916c7440e0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/AndroidManifest.xml b/Assets/Plugins/Android/AndroidManifest.xml deleted file mode 100644 index 005b5b7..0000000 --- a/Assets/Plugins/Android/AndroidManifest.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Assets/Plugins/Android/AndroidManifest.xml.meta b/Assets/Plugins/Android/AndroidManifest.xml.meta deleted file mode 100644 index b9f0f59..0000000 --- a/Assets/Plugins/Android/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 112c6eae8462e4dc58c62c8d6d6beeb5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar b/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar deleted file mode 100644 index 0669512..0000000 Binary files a/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar.meta b/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar.meta deleted file mode 100644 index a920a40..0000000 --- a/Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: b82c99c4360b94d66a3bd67aac4b7ad1 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar b/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar deleted file mode 100644 index 98ec886..0000000 Binary files a/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar.meta b/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar.meta deleted file mode 100644 index 2c0c94f..0000000 --- a/Assets/Plugins/Android/androidx.arch.core.core-common-2.0.0.jar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 8a7c908e323564f9ab2941960ec682ae -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar b/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar deleted file mode 100644 index f876595..0000000 Binary files a/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar.meta b/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar.meta deleted file mode 100644 index 212c1c2..0000000 --- a/Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 495df7c9c6e4043338bd0f37c863abd9 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar b/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar deleted file mode 100644 index 337f4c4..0000000 Binary files a/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar.meta deleted file mode 100644 index 79ce39f..0000000 --- a/Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: a13fcdb649f0744eba60e9430352f970 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar b/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar deleted file mode 100644 index 78ac06c..0000000 Binary files a/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar.meta b/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar.meta deleted file mode 100644 index 6e30d3c..0000000 --- a/Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 20946214b4bea4adea3597b7745bbcb5 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar b/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar deleted file mode 100644 index de447ec..0000000 Binary files a/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar.meta deleted file mode 100644 index 0112074..0000000 --- a/Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 367565a20479b4f5b86364c2bf9d9a35 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.core.core-1.2.0.aar b/Assets/Plugins/Android/androidx.core.core-1.2.0.aar deleted file mode 100644 index e8be07b..0000000 Binary files a/Assets/Plugins/Android/androidx.core.core-1.2.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.core.core-1.2.0.aar.meta b/Assets/Plugins/Android/androidx.core.core-1.2.0.aar.meta deleted file mode 100644 index 6ce33ca..0000000 --- a/Assets/Plugins/Android/androidx.core.core-1.2.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: fb1ccba00bf574192bf5c7b85c53ac37 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar b/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar deleted file mode 100644 index cd1494a..0000000 Binary files a/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar.meta deleted file mode 100644 index a409db9..0000000 --- a/Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 11230265b17944023abe71e9a80b6ee6 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar b/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar deleted file mode 100644 index 73e70ac..0000000 Binary files a/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar.meta deleted file mode 100644 index 84c70f5..0000000 --- a/Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: f42204833a99d4594a9459827f53452b -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar b/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar deleted file mode 100644 index 79fd550..0000000 Binary files a/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar.meta deleted file mode 100644 index d0f89fd..0000000 --- a/Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: d94120dd499894b4284965afc6731b4a -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar b/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar deleted file mode 100644 index a9968c7..0000000 Binary files a/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar.meta deleted file mode 100644 index 0e37a57..0000000 --- a/Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 72bcc8053ec754e4e9e06853fad5d824 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar b/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar deleted file mode 100644 index 7a5c360..0000000 Binary files a/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar.meta deleted file mode 100644 index b68f741..0000000 --- a/Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 95249b1edb0cc4098933999946d78781 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar b/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar deleted file mode 100644 index bccf86f..0000000 Binary files a/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar.meta deleted file mode 100644 index 999b50b..0000000 --- a/Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 68720a4b36afb4610924c89e8895fd80 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar b/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar deleted file mode 100644 index 01275eb..0000000 Binary files a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar.meta deleted file mode 100644 index 2a07e8e..0000000 --- a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 3999c6a63cc774ba1b1aea7e19903783 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar b/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar deleted file mode 100644 index 2980f60..0000000 Binary files a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar.meta deleted file mode 100644 index d99c975..0000000 --- a/Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 8a9981fcdcf0c441e91bb2d646a9116b -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar deleted file mode 100644 index 6c3f095..0000000 Binary files a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar.meta b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar.meta deleted file mode 100644 index 7a8acd5..0000000 --- a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 66f5bc40f86834936b8041f5e82482c4 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar deleted file mode 100644 index 27b091c..0000000 Binary files a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar.meta b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar.meta deleted file mode 100644 index b29bfc2..0000000 --- a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: a17eca40d123c45f1b52e6016989fea0 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar deleted file mode 100644 index 5583b9f..0000000 Binary files a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar.meta b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar.meta deleted file mode 100644 index 9e9dee9..0000000 --- a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 79769dd06a4be403f9c182a53efd500b -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar deleted file mode 100644 index 0809d72..0000000 Binary files a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar.meta b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar.meta deleted file mode 100644 index e2276c8..0000000 --- a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: a60180e1148f14c2ea4dcca85f5181c3 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar deleted file mode 100644 index b142a70..0000000 Binary files a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar.meta b/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar.meta deleted file mode 100644 index 81dc41a..0000000 --- a/Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 612d004bfd1424c25afbbdb52ed665c4 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar b/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar deleted file mode 100644 index 32c5774..0000000 Binary files a/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar.meta deleted file mode 100644 index 2cfba55..0000000 --- a/Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 636f94d30fbe2440f977a6846ea850dd -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar b/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar deleted file mode 100644 index e9074ee..0000000 Binary files a/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar.meta deleted file mode 100644 index ffe06a7..0000000 --- a/Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 2b6561c534cb44737b3b4705aec3b165 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.print.print-1.0.0.aar b/Assets/Plugins/Android/androidx.print.print-1.0.0.aar deleted file mode 100644 index 7bb51fd..0000000 Binary files a/Assets/Plugins/Android/androidx.print.print-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.print.print-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.print.print-1.0.0.aar.meta deleted file mode 100644 index 662abd9..0000000 --- a/Assets/Plugins/Android/androidx.print.print-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: e1b62b527d68e4f52866ec0aa9795a28 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar b/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar deleted file mode 100644 index ebee0ee..0000000 Binary files a/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar.meta deleted file mode 100644 index 51d7310..0000000 --- a/Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: e8cfd1a7930ef458fba9fbc250f0314d -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar b/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar deleted file mode 100644 index 71d4748..0000000 Binary files a/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar.meta deleted file mode 100644 index 98bbe93..0000000 --- a/Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 0bd36f65088ed473896ea0c31ce72a4a -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar b/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar deleted file mode 100644 index d4792e0..0000000 Binary files a/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar.meta b/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar.meta deleted file mode 100644 index 308dc6c..0000000 --- a/Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 4006f9785465b41c186a9155805c6049 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar b/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar deleted file mode 100644 index a766729..0000000 Binary files a/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar.meta b/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar.meta deleted file mode 100644 index e86b96e..0000000 --- a/Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: ee4ebe232aa754862873d7a61e854934 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar deleted file mode 100644 index e20a3b8..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar.meta deleted file mode 100644 index a057e0e..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-base-18.0.1.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 62219fcd000074cd591ad74d628d6bd8 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar deleted file mode 100644 index f5da36f..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar.meta deleted file mode 100644 index c6f8e4f..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-basement-18.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 08e12a236a9f148829e4db387c148339 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar deleted file mode 100644 index d2ae8e3..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar.meta deleted file mode 100644 index 672988a..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-drive-17.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 57ff026ef4bcb4005a41d09d42113a8d -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar deleted file mode 100644 index 8cb0a3e..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar.meta deleted file mode 100644 index a047783..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-games-v2-17.0.0.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: cb0de1b1f8d6f4f5c8781860a7c57e83 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar deleted file mode 100644 index e97035d..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar.meta deleted file mode 100644 index bd5a271..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-nearby-18.0.2.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 1525469aed2be406ea25da428d9b8b4f -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar b/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar deleted file mode 100644 index dca0eb6..0000000 Binary files a/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar.meta b/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar.meta deleted file mode 100644 index 003fb2e..0000000 --- a/Assets/Plugins/Android/com.google.android.gms.play-services-tasks-18.0.1.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: 11aef264483f34195846ee3a5fc3590d -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar b/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar deleted file mode 100644 index c5baea5..0000000 Binary files a/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar and /dev/null differ diff --git a/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar.meta b/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar.meta deleted file mode 100644 index 54ff3b4..0000000 --- a/Assets/Plugins/Android/com.google.games.gpgs-plugin-support-0.11.01.aar.meta +++ /dev/null @@ -1,34 +0,0 @@ -fileFormatVersion: 2 -guid: d1923df2a62594820a52b5c1e18394a5 -labels: -- gpsr -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/Resources.meta deleted file mode 100644 index 4305b15..0000000 --- a/Assets/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: afbacec031344484bae3e1ffb89f5f9c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/BillingMode.json b/Assets/Resources/BillingMode.json deleted file mode 100644 index 6f4bfb7..0000000 --- a/Assets/Resources/BillingMode.json +++ /dev/null @@ -1 +0,0 @@ -{"androidStore":"GooglePlay"} \ No newline at end of file diff --git a/Assets/Resources/BillingMode.json.meta b/Assets/Resources/BillingMode.json.meta deleted file mode 100644 index ede3ab2..0000000 --- a/Assets/Resources/BillingMode.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 93b0fb62e58cd4ac18bc883d9652c711 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/UnityPlayerAccountSettings.asset b/Assets/Resources/UnityPlayerAccountSettings.asset deleted file mode 100644 index 173ab5a..0000000 --- a/Assets/Resources/UnityPlayerAccountSettings.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: b58a3bc647e70774b8c7225eb3b51e7e, type: 3} - m_Name: UnityPlayerAccountSettings - m_EditorClassIdentifier: - clientId: - scopeMask: 7 - useCustomDeepLinkUri: 0 - customScheme: - customHost: diff --git a/Assets/Resources/UnityPlayerAccountSettings.asset.meta b/Assets/Resources/UnityPlayerAccountSettings.asset.meta deleted file mode 100644 index 3934cf7..0000000 --- a/Assets/Resources/UnityPlayerAccountSettings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 80db9245fb7aa4f05a3c3845120f0fac -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples.meta b/Assets/Sample.meta similarity index 100% rename from Assets/Samples.meta rename to Assets/Sample.meta diff --git a/Assets/Samples/Assets.meta b/Assets/Sample/Assets.meta similarity index 100% rename from Assets/Samples/Assets.meta rename to Assets/Sample/Assets.meta diff --git a/Assets/Samples/Assets/StashIcon.png b/Assets/Sample/Assets/StashIcon.png similarity index 100% rename from Assets/Samples/Assets/StashIcon.png rename to Assets/Sample/Assets/StashIcon.png diff --git a/Assets/Samples/Assets/StashIcon.png.meta b/Assets/Sample/Assets/StashIcon.png.meta similarity index 100% rename from Assets/Samples/Assets/StashIcon.png.meta rename to Assets/Sample/Assets/StashIcon.png.meta diff --git a/Assets/Samples/Assets/StashLogo.obj b/Assets/Sample/Assets/StashLogo.obj similarity index 100% rename from Assets/Samples/Assets/StashLogo.obj rename to Assets/Sample/Assets/StashLogo.obj diff --git a/Assets/Samples/Assets/StashLogo.obj.meta b/Assets/Sample/Assets/StashLogo.obj.meta similarity index 100% rename from Assets/Samples/Assets/StashLogo.obj.meta rename to Assets/Sample/Assets/StashLogo.obj.meta diff --git a/Assets/Samples/Assets/StashMaterial.mat b/Assets/Sample/Assets/StashMaterial.mat similarity index 100% rename from Assets/Samples/Assets/StashMaterial.mat rename to Assets/Sample/Assets/StashMaterial.mat diff --git a/Assets/Samples/Assets/StashMaterial.mat.meta b/Assets/Sample/Assets/StashMaterial.mat.meta similarity index 100% rename from Assets/Samples/Assets/StashMaterial.mat.meta rename to Assets/Sample/Assets/StashMaterial.mat.meta diff --git a/Assets/Samples/Scenes.meta b/Assets/Sample/Scenes.meta similarity index 100% rename from Assets/Samples/Scenes.meta rename to Assets/Sample/Scenes.meta diff --git a/Assets/Samples/Scenes/StashSample.unity b/Assets/Sample/Scenes/StashSample.unity similarity index 87% rename from Assets/Samples/Scenes/StashSample.unity rename to Assets/Sample/Scenes/StashSample.unity index 5fb16bb..0f6d953 100644 --- a/Assets/Samples/Scenes/StashSample.unity +++ b/Assets/Sample/Scenes/StashSample.unity @@ -522,10 +522,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 868708303} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 392.25, y: -15.645} + m_SizeDelta: {x: 784.5, y: 31.29} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &375644528 MonoBehaviour: @@ -624,43 +624,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 375644526} m_CullTransparentMesh: 1 ---- !u!1 &523908575 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 523908576} - m_Layer: 5 - m_Name: UserName - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &523908576 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 523908575} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1751549685} - - {fileID: 1702200495} - m_Father: {fileID: 1428247368} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -44} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &738422954 GameObject: m_ObjectHideFlags: 0 @@ -1322,7 +1285,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c059b5309f9a944cd95c34cec4ad2e03, type: 3} m_Name: m_EditorClassIdentifier: - userLabel: {fileID: 1751549686} + userLabel: {fileID: 0} confirmPanel: {fileID: 854196019} --- !u!1 &1422552907 GameObject: @@ -1597,7 +1560,6 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 854196020} - - {fileID: 523908576} - {fileID: 1055339173} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1930,274 +1892,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1699005016} m_CullTransparentMesh: 1 ---- !u!1 &1702200494 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1702200495} - - component: {fileID: 1702200497} - - component: {fileID: 1702200496} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1702200495 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1702200494} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 523908576} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 27, y: -535.60004} - m_SizeDelta: {x: 163.6691, y: 53.8744} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1702200496 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1702200494} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 'User:' - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 36 - m_fontSizeBase: 36 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 1 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 256 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: -344.98517, y: 0, z: -290.5457, w: 21.525337} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &1702200497 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1702200494} - m_CullTransparentMesh: 1 ---- !u!1 &1751549684 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1751549685} - - component: {fileID: 1751549687} - - component: {fileID: 1751549686} - m_Layer: 5 - m_Name: User - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1751549685 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1751549684} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 523908576} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 87, y: -589.1} - m_SizeDelta: {x: 163.6691, y: 53.8744} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1751549686 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1751549684} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Not Signed In - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 36 - m_fontSizeBase: 36 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 256 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: -407.31235, y: 0, z: -231.45154, w: 4.752468} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &1751549687 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1751549684} - m_CullTransparentMesh: 1 --- !u!1 &2024498067 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Samples/Scenes/StashSample.unity.meta b/Assets/Sample/Scenes/StashSample.unity.meta similarity index 100% rename from Assets/Samples/Scenes/StashSample.unity.meta rename to Assets/Sample/Scenes/StashSample.unity.meta diff --git a/Assets/Samples/Scripts.meta b/Assets/Sample/Scripts.meta similarity index 100% rename from Assets/Samples/Scripts.meta rename to Assets/Sample/Scripts.meta diff --git a/Assets/Samples/Scripts/DeeplinkExample.cs b/Assets/Sample/Scripts/DeeplinkExample.cs similarity index 57% rename from Assets/Samples/Scripts/DeeplinkExample.cs rename to Assets/Sample/Scripts/DeeplinkExample.cs index 42b7b79..63b5aa0 100644 --- a/Assets/Samples/Scripts/DeeplinkExample.cs +++ b/Assets/Sample/Scripts/DeeplinkExample.cs @@ -40,14 +40,7 @@ private void Awake() private void Start() { - // Automatically log in player on the game launch based on the platform. -#if UNITY_ANDROID - PlayGames.Activate(); -#endif - -#if UNITY_IOS - GameCenter.Activate(); -#endif + } @@ -70,40 +63,7 @@ private void OnDeepLinkActivated(string url) /// public async void ProcessLinking() { - confirmPanel.SetActive(false); - - #if UNITY_ANDROID - PlayGames.RefreshCredentials(); - try - { - LinkResponse response = await StashAuth.LinkGooglePlayGames(_stashChallenge, InternalPlayerId, PlayGames.AuthCode); - - Debug.Log("[STASH][Google Play Games] Account linked successfully."); - } - catch (StashRequestError e) - { - Debug.LogError($"[STASH][Google Play Games] Account linking failed. Code: {e.Code}, Message: {e.Message}"); - } - #endif - - #if UNITY_IOS - await GameCenter.RefreshCredentials(); - try - { - LinkResponse response = await StashClient.LinkAppleGameCenter( _stashChallenge, InternalPlayerId, "com.Stash.iosdemo", - GameCenter.TeamPlayerID, GameCenter.Signature, GameCenter.Salt, GameCenter.PublicKeyUrl, GameCenter.Timestamp); - - Debug.Log("[STASH][Apple Game Center] Account linked successfully."); - } - catch (StashRequestError e) - { - Debug.LogError($"[STASH][Apple Game Center] Account linking failed. Code: {e.Code}, Message: {e.Message}"); - } - #endif + } - public void DisplayUsername(string username) - { - userLabel.text = username; - } } \ No newline at end of file diff --git a/Assets/Samples/Scripts/DeeplinkExample.cs.meta b/Assets/Sample/Scripts/DeeplinkExample.cs.meta similarity index 100% rename from Assets/Samples/Scripts/DeeplinkExample.cs.meta rename to Assets/Sample/Scripts/DeeplinkExample.cs.meta diff --git a/Assets/Samples/Scripts/Log.cs b/Assets/Sample/Scripts/Log.cs similarity index 100% rename from Assets/Samples/Scripts/Log.cs rename to Assets/Sample/Scripts/Log.cs diff --git a/Assets/Samples/Scripts/Log.cs.meta b/Assets/Sample/Scripts/Log.cs.meta similarity index 100% rename from Assets/Samples/Scripts/Log.cs.meta rename to Assets/Sample/Scripts/Log.cs.meta diff --git a/Assets/Samples/Scripts/LogoRotation.cs b/Assets/Sample/Scripts/LogoRotation.cs similarity index 100% rename from Assets/Samples/Scripts/LogoRotation.cs rename to Assets/Sample/Scripts/LogoRotation.cs diff --git a/Assets/Samples/Scripts/LogoRotation.cs.meta b/Assets/Sample/Scripts/LogoRotation.cs.meta similarity index 100% rename from Assets/Samples/Scripts/LogoRotation.cs.meta rename to Assets/Sample/Scripts/LogoRotation.cs.meta diff --git a/Assets/Samples/Dependencies.meta b/Assets/Samples/Dependencies.meta deleted file mode 100644 index fc30a03..0000000 --- a/Assets/Samples/Dependencies.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d89ef9e25cc3046848a1045dec8b7d1e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Apple.Core.meta b/Assets/Samples/Dependencies/Apple.Core.meta deleted file mode 100644 index 9aa1722..0000000 --- a/Assets/Samples/Dependencies/Apple.Core.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8d26417a25e1944f1b7750a18abb2b4f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Apple.Core/Editor.meta b/Assets/Samples/Dependencies/Apple.Core/Editor.meta deleted file mode 100644 index 45c0d3f..0000000 --- a/Assets/Samples/Dependencies/Apple.Core/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 440b602cefc764323afc8d5c9d3e961b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset b/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset deleted file mode 100644 index ef407b3..0000000 --- a/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset +++ /dev/null @@ -1,97 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-8987626434458726503 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 88a319fb99484804b632ce9bbec4cf6d, type: 3} - m_Name: AppleSecurityBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 - AppSandboxEntitlement: 1 - AllowNetworkServer: 0 - AllowNetworkClient: 0 - AllowCamera: 0 - AllowMicrophone: 0 - AllowUsb: 0 - AllowPrint: 0 - AllowBluetooth: 0 - AllowAddressBook: 0 - AllowLocation: 0 - AllowCalendars: 0 - AllowUserSelectedReadOnly: 0 - AllowUserSelectedReadWrite: 0 - AllowDownloadsReadOnly: 0 - AllowDownloadsReadWrite: 0 - AllowPicturesReadOnly: 0 - AllowPicturesReadWrite: 0 - AllowMusicReadOnly: 0 - AllowMusicReadWrite: 0 - AllowMoviesReadOnly: 0 - AllowMoviesReadWrite: 0 ---- !u!114 &-4631973922516641064 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 24e6011bb95664520aa4858e4c359e06, type: 3} - m_Name: AppleGameKitBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 ---- !u!114 &-1182492731493557681 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: c6b8a8fe473224decaaecc9264d56e95, type: 3} - m_Name: AppleCoreBuildStep - m_EditorClassIdentifier: - IsEnabled: 1 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: 6b2797781d18e4c5987f2acb206f9e7b, type: 3} - m_Name: DefaultAppleBuildProfile - m_EditorClassIdentifier: - AutomateInfoPlist: 1 - DefaultInfoPlist: {fileID: 0} - MinimumOSVersion_iOS: 12.0 - MinimumOSVersion_tvOS: 12.0 - MinimumOSVersion_macOS: 10.15.0 - AppUsesNonExemptEncryption: 0 - AutomateEntitlements: 1 - DefaultEntitlements: {fileID: 0} ---- !u!114 &750258044150326352 -MonoBehaviour: - m_ObjectHideFlags: 0 - 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: 11500000, guid: fe2e2f0820ab4779ac857f0e06bac5fb, type: 3} - m_Name: AppleUserManagementBuildStep - m_EditorClassIdentifier: - IsEnabled: 0 - AllowGetCurrentUser: 0 - AllowRunsAsCurrentUser: 0 diff --git a/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta b/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta deleted file mode 100644 index 5ac1fa9..0000000 --- a/Assets/Samples/Dependencies/Apple.Core/Editor/DefaultAppleBuildProfile.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 97417ebe3a84845f5839ba872b72c9bf -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager.meta b/Assets/Samples/Dependencies/ExternalDependencyManager.meta deleted file mode 100644 index 2bca98e..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1823bf77a280153a7ac7dc8f36992da0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor.meta deleted file mode 100644 index da33852..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 28dc314a271982f84bce39c140774128 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169.meta deleted file mode 100644 index ac29514..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 915c158b06079337fb2ca40f56727c1d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll deleted file mode 100755 index 214390d..0000000 Binary files a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll and /dev/null differ diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll.meta deleted file mode 100644 index 396b966..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -fileFormatVersion: 2 -guid: e2b1894e7d784825bf9719c33331fae8 -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll -- gvhp_targets-editor -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll deleted file mode 100755 index 4761399..0000000 Binary files a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll and /dev/null differ diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll.meta deleted file mode 100644 index 05bf9c0..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -fileFormatVersion: 2 -guid: 2730c87d98d4480884d11cfb29ff72cb -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll -- gvhp_targets-editor -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll deleted file mode 100755 index b23356b..0000000 Binary files a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll and /dev/null differ diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll.meta deleted file mode 100644 index 7676ed7..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -fileFormatVersion: 2 -guid: 3ed19a202c4b4b439183dc00efee3c4a -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll -- gvhp_targets-editor -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll deleted file mode 100755 index 215b999..0000000 Binary files a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll and /dev/null differ diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll.meta deleted file mode 100644 index d26a581..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -fileFormatVersion: 2 -guid: 14338063180a4626be53643cb2ab5d69 -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll -- gvhp_targets-editor -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md deleted file mode 100755 index 79d7b94..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md +++ /dev/null @@ -1,1338 +0,0 @@ -# Version 1.2.169 - Jan 20, 2021 -* General - Fixes #425 - Change to save `GvhProjectSettings.xml` without - Unicode byte order mark (BoM). -* Android Resolver - Remove reference to `jcenter()` -* iOS Resolver - Force setting `LANG` when executing Cocoapods in shell mode on - Mac. - -# Version 1.2.168 - Dec 9, 2021 -* All - Fixes #472 by removing the use of `System.Diagnostics.Debug.Assert` -* All - Fixed #477 by properly enabling EDM4U libraries for Unity 2021.2+ when - the package is installed through `.tgz` - -# Version 1.2.167 - Oct 6, 2021 -* All - Moved versioned `.dll` in EDM4U to a versioned folder and remove their - version postfix in their filename. For instance, `IOSResolver.dll` will be - placed at `ExternalDependencyManager/Editor/1.2.167/Google.IOSResolver.dll`. -* Android Resolver - Fixed #243 by only using the highest version in - `mainTemplate.gradle` when duplicated dependencies are presented. -* Android Resolver - Added supports to x86_64 to ABI list for Android apps on - Chrome OS. - -# Version 1.2.166 - Jun 30, 2021 -* All - Fixed #440 and fixed #447 by specifying the parameter type while calling - `GetApplicationIdentifier()` Unity API using reflection, due to a new - overloaded method introduced in Unity 2021.2. -* Android Resolver - Fixed #442 by patching `Dependency.IsGreater()` when the - version strings end '+'. - -# Version 1.2.165 - Apr 28, 2021 -## Bug Fixes -* Version Handler - Fixed #431 by replacing the use of `HttpUtility.UrlEncode()` - which causes NullReferenceException in certain version of Unity. -* Android Resolver - Check that androidSdkRootPath directory exists before using - as sdkPath. -* Android Resolver - Fixed Android Resolver integration tests with Unity - 2019.3+. - -# Version 1.2.164 - Feb 4, 2021 -## New Features -* Android Resolver - Added support for Android packages with classifier in their - namespaces. -* iOS Resolver - Added new settings in iOS Resolver to configure generated - Podfile. -* iOS Resolver - Added a new attribute `addToAllTargets` in Dependencies.xml. - -## Bug Fixes -* iOS Resolver - Fixed XML parsing for `bitcodeEnabled` attribute in - Dependencies.xml. - -# Version 1.2.163 - Dec 15, 2020 -## Bug Fixes -* Version Handler - Fixed measurement reporting - -# Version 1.2.162 - Nov 19, 2020 -## Bug Fixes -* Version Handler - Improved #413 by preventing Version Handler from running - from static constructor when it is disabled. -* Package Manager Resolver - Remove GPR - -# Version 1.2.161 - Oct 12, 2020 -## Bug Fixes -* Android Resolver - Fixed the issue that Android Resolver does not resolve - again before build in Unity 2020 if it failed to resolve previously. - -# Version 1.2.160 - Sep 30, 2020 -## Bug Fixes -* Android Resolver - Fixed a regression that gradleResolver can be null until - Initialize() is called. -* Android Resolver - Fixed a regression that Android Resolver failed in Unity - 2019.3+ due to `gradleTemplate.properties` not enabled when - `mainTemplate.gradle` is not enabled at all. - -# Version 1.2.159 - Sep 11, 2020 -## Bug Fixes -* Android Resolver - Fixed #322 where the Unity editor will lose its target SDK - setting between Unity restarts if `>28` is selected in 2019. This is due to - Unity AndroidSdkVersions enum does not contain values above 28. -* Android Resolver - Fixed #360 where building Android app with Untiy 2019.3+ - may fail due to Jetifier and AndroidX not enabled properly in generated - Gradle project. This fix requires the user to enable - `Custom Gradle Properties Template` found under - `Player Settings > Settings for Android > Publishing Settings`. - -# Version 1.2.158 - Sep 3, 2020 -## Bug Fixes -* Version Handler: Fixed editor freeze when `-executeMethod` is used in - non-batch mode. -* Android Resolver: Normalized file paths when generating local Maven repo - since the path may contains a mix of forward and backward slash on Windows. -* Export Unity Package: Fixed generation of .unitypackage with tarfile on - Windows. - -# Version 1.2.157 - Aug 6, 2020 -## Bug Fixes -* Android Resolver: Delay initialization until active build target is Android - and the editor is not in play mode. -* iOS Resolver: Delay initialization until active build target is iOS - and the editor is not in play mode. -* Export Unity Package: Workaround directory creation racy if multiple export - operations are spawned at the same time. - -# Version 1.2.156 - June 10, 2020 -## Bug Fixes -* Android Resolver: Fixed that the generated local repo assets contains - redundent labels which are causing Version Handler to failed while - uninstalling packages. -* Android Resolver: Fixed that the repo url injected into mainTemplate.gradle - is incorrect when Unity is configured to export gradle project. -* Android Resolver: Limited to only create local Maven repo when the source - repo contains ".srcaar" file. - -## Changes -* All: Described EDM4U analytics data usage in readme. - -# Version 1.2.155 - May 14, 2020 -## Bug Fixes -* All: Fixed compiler error when build with Unity 5.4 or below due to the - usage of Rect.zero. -* All: Ignore cases when checking command line arguments. - -# Version 1.2.154 - May 14, 2020 -## Bug Fixes -* All: Make each MultiSelectWindow for different purposes to have its own - unique window. - -## Changes -* All: Replace all dialog with DialogWindow which is implemented from - EditorWindow. -* Package Manager Resolver: Clarify how manifest.json will be changed in Package - Manager Resolver window. - -# Version 1.2.153 - Apr 24, 2020 -## Bug Fixes -* Android Resolver: Fixed an exception when repainting the Android resolution - window in Unity 2019.3.x. - -# Version 1.2.152 - Apr 17, 2020 -## Bug Fixes -* Version Handler: Fixed exception when waiting for enabled editor DLLs to - load. -* Android Resolver: Fixed regression when using a Custom Gradle Template - on Windows. - -# Version 1.2.151 - Apr 16, 2020 -## Bug Fixes -* Version Handler: When waiting for newly enabled editor DLLs to load, ignore - all DLLs that do not have a file-system location. -* Android Resolver: Fixed resolution when using a Custom Gradle Template with - libraries stored in a local maven repository distributed with a plugin - installed with the Unity Package Manager. - -# Version 1.2.150 - Apr 9, 2020 -## Bug Fixes -* All: The new packaging script when run on MacOS was generating a - .unitypackage archive that could not be read by Unity on Windows. - This release simply repackages the plugin with tar/gzip to fix the problem. - -# Version 1.2.149 - Apr 8, 2020 -## Bug Fixes -* Package Manager Resolver: Fixed spurious error message when resuming - migration after installing a UPM package. - -# Version 1.2.148 - Apr 8, 2020 -## Bug Fixes -* Package Manager Resolver: Fixed an exception when resuming migration - after installing a UPM package. - -# Version 1.2.147 - Apr 8, 2020 -## Bug Fixes -* Version Handler: Fixed alias traversal bug which caused problems when - migrating from installed .unitypackage files to UPM packages. - -# Version 1.2.146 - Apr 8, 2020 -## Bug Fixes -* Version Handler: Fixed exception in manifest parsing when a manifest is - detected with no aliases. - -# Version 1.2.145 - Apr 2, 2020 -## New Features -* Package Manager Resolver: Added a method to migrate Version Handler - managed packages installed via `.unitypackage` to Unity Package Manager - packages. This is initially used to migrate the External Dependency Manager - to UPM. - -## Changes -* All: Verbose logging is now no longer automatically enabled in batch mode - across all components. Instead logging can be configured using each - component's verbose logging setting or by using the `-gvh_log_debug` command - line flag when starting Unity. -* Version Handler: Sped up version handler updates when the app domain isn't - reloaded. - -## Bug Fixes -* Version Handler: Fixed the display of the obsolete files clean up dialog - when the asset database refreshes. -* Version Handler: Improved reliability of callback from - the VersionHandler.UpdateCompleteMethods event when an asset database - refresh occurs. -* Version Handler: Fixed duplicate exportPath labels when 'Assets/' is the - root of paths assigned to files. -* Version Handler: Handle empty lines in manifest files. - -# Version 1.2.144 - Mar 23, 2020 -## Changed -* iOS Resolver: Removed the ability to configure the Xcode target a Cocoapod - is added to. - -## Bug Fixes -* iOS Resolver: Reverted support for adding Cocoapods to multiple targets as - it caused a regression (exception thrown during post-build step) in some - versions of Unity. - -# Version 1.2.143 - Mar 20, 2020 -## Bug Fixes -* Android Resolver: Fixed caching of resolution state which was causing - the resolver to always run when no dependencies had changed. - -# Version 1.2.142 - Mar 19, 2020 -## Changes -* Package Manager Resolver: Enabled auto-add by default. - -# Version 1.2.141 - Mar 19, 2020 -## Bug Fixes -* Fixed a bug when retrieving project settings. If a plugin was configured - to fetch project settings, if a setting was fetched (e.g "foo") and this - setting existed in the system settings but not the project settings the - system value would override the default value leading to unexpected - behavior. -* Fixed a warning when caching web request classes in Unity 5.6. - -# Version 1.2.140 - Mar 19, 2020 -## Bug Fixes -* Fixed measurement reporting in Unity 5.x. -* Version Handler: Fixed NullReferenceException when an asset doesn't have - an AssetImporter. - -# Version 1.2.139 - Mar 18, 2020 -## Changed -* Added documentation to the built plugin. - -# Version 1.2.138 - Mar 17, 2020 -## New Features -* Package Manager Resolver: Added the Package Manager Resolver - component that allows developers to easily boostrap Unity Package Manager - (UPM) registry addition using unitypackage plugins. -* Version Handler: Added a window that allows plugins to managed by the - Version Handler to be uninstalled. -* Version Handler: Added support for displaying installed plugins. -* Version Handler: Added support for moving files in plugins to their install - locations (if the plugin has been configured to support this). -* iOS Resolver: Added the ability to configure the Xcode target a Cocoapod is - added to. - -## Bug Fixes -* Fixed upgrade from version 1.2.137 and below after the plugin rename to - EDM4U broke the upgrade process. -* Android Resolver: Worked around PlayerSettings.Android.targetSdkVersion - returning empty names for some values in 2019.x. -* Version Handler: Fixed the display of the obsolete files clean up window. -* Version Handler: Fixed managed file check when assets are modified in the - project after plugin import. - -# Version 1.2.137 - Mar 6, 2020 -## Changed -* Renamed package to External Package Manager for Unity (EDM4U). - We changed this to reflect what this plugin is doing today which is far more - than the original scope which just consisted of importing jar files from the - Android SDK maven repository. - Scripts that used to pull `play-services-resolver*.unitypackage` will now have - to request `external-dependency-manager*.unitypackage` instead. - We'll still be shipping a `play-services-resolver*_manifest.txt` file to - handle upgrading from older versions of the plugin. - -## New Features -* All Components: Added reporting of usage so that we can remotely detect - errors and target improvements. -* Android Resolver: Added support for *Dependencies.xml files in Unity Package - Manager packages. -* iOS Resolver: Added support for *Dependencies.xml files in Unity Package - Manager packages. - -## Bug Fixes -* Version Handler: Disabled attempts to disable asset metadata modification - when assets are in a Unity Package Manager managed package. - -# Version 1.2.136 - Feb 19, 2019 -## Bug Fixes -* Android Resolver: Fixed OpenJDK path discovery in Unity 2019.3.1. - -# Version 1.2.135 - Dec 5, 2019 -## Bug Fixes -* All Components: Fixed stack overflow when loading project settings. - -# Version 1.2.134 - Dec 4, 2019 -## Bug Fixes -* All Components: Fixed an issue which caused project settings to be cleared - when running in batch mode. - -# Version 1.2.133 - Nov 18, 2019 -## Bug Fixes -* All Components: Failure to save project settings will now report an error - to the log rather than throwing an exception. - -# Version 1.2.132 - Nov 11, 2019 -## Bug Fixes -* Android Resolver: Worked around expansion of DIR_UNITYPROJECT on Windows - breaking Gradle builds when used as part of a file URI. -* Android Resolver: mainTemplate.gradle is only written if it needs to be - modified. - -# Version 1.2.131 - Oct 29, 2019 -## Bug Fixes -* Version Handler: Improved execution of events on the main thread in batch - mode. -* Version Handler: Improved log level configuration at startup. -* Version Handler: Improved performance of class lookup in deferred method - calls. -* Version Handler: Fixed rename to enable / disable for editor assets. -* iOS Resolver: Improved log level configuration at startup. -* Android Resolver: Improved local maven repo path reference in - mainTemplate.gradle using DIR_UNITYPROJECT. DIR_UNITYPROJECT by Unity - to point to the local filesystem path of the Unity project when Unity - generates the Gradle project. - -# Version 1.2.130 - Oct 23, 2019 -## New Features -* iOS Resolver: Added support for modifying the Podfile before `pod install` - is executed. - -## Bug Fixes -* Version Handler: Fixed invalid classname error when calling - `VersionHandler.UpdateVersionedAssets()`. - -# Version 1.2.129 - Oct 2, 2019 -## Bug Fixes -* iOS Resolver: Changed Cocoapod integration in Unity 2019.3+ to - only add Pods to the UnityFramework target. - -# Version 1.2.128 - Oct 1, 2019 -## Bug Fixes -* iOS Resolver: Fixed Cocoapod project integration mode with Unity - 2019.3+. - -# Version 1.2.127 - Sep 30, 2019 -## Changes -* Android Resolver: All Android Resolver settings File paths are now - serialized with POSIX directory separators. - -# Version 1.2.126 - Sep 27, 2019 -## Changes -* Android Resolver: File paths are now serialized with POSIX directory - separators. -## Bug Fixes -* Android Resolver: Fixed resolution when the parent directory of a Unity - project contains a Gradle project (i.e `settings.gradle` file). - -# Version 1.2.125 - Sep 23, 2019 -## Bug Fixes -* All components: Silenced a warning about not being able to set the console - encoding to UTF8. -* Android Resolver: Worked around broken AndroidSDKTools class in some - versions of Unity. -* iOS Resolver: Fixed iOS target SDK version check -* Version Handler: Changed clean up obsolete files window so that it doesn't - exceed the screen size. - -# Version 1.2.124 - Jul 28, 2019 -## Bug Fixes -* All components: Fixed regression with source control integration when using - Unity 2019.1+. - -# Version 1.2.123 - Jul 23, 2019 -## New Features -* All components: Source control integration for project settings. -## Changes -* Android Resolver: Removed AAR cache as it now makes little difference to - incremental resolution performance. -* Android Resolver: Improved embedded resource management so that embedded - resources should upgrade when the plugin is updated without restarting - the Unity editor. -## Bug Fixes -* Version Handler: Fixed InvokeMethod() and InvokeStaticMethod() when calling - methods that have interface typed arguments. - -# Version 1.2.122 - Jul 2, 2019 -## Bug Fixes -* iOS Resolver: Worked around Unity not loading the iOS Resolver DLL as it - referenced the Xcode extension in a public interface. The iOS Resolver - DLL still references the Xcode extension internally and just handles - missing type exceptions dynamically. - -# Version 1.2.121 - Jun 27, 2019 -## Bug Fixes -* Android Resolver: Fixed warning about missing Packages folder when loading - XML dependencies files in versions of Unity without the package manager. -* Android Resolver: Fixed resolution window progress bar exceeding 100%. -* Android Resolver: If AndroidX is detected in the set of resolved libraries, - the user will be prompted to enable the Jetifier. -* Android Resolver: Improved text splitting in text area windows. -* iOS Resolver: Added support for Unity's breaking changes to the Xcode API - in 2019.3.+. Cocoapods are now added to build targets, Unity-iPhone and - UnityFramework in Unity 2019.3+. - -# Version 1.2.120 - Jun 26, 2019 -## New Features -* Android Resolver: Added support for loading *Dependencies.xml files from - Unity Package Manager packages. -* Android Resolver: Resolution window is now closed if resolution runs as - a pre-build step. -* iOS Resolver: Added support for loading *Dependencies.xml files from - Unity Package Manager packages. -## Bug Fixes -* Android Resolver: Fixed generation of relative repo paths when using - mainTemplate.gradle resolver. -* Android Resolver: Fixed copy of .srcaar to .aar files in repos embedded in a - project when a project path has characters (e.g whitespace) that are escaped - during conversion to URIs. -* Android Resolver: Fixed auto-resolution always running if the Android SDK - is managed by Unity Hub. - -# Version 1.2.119 - Jun 19, 2019 -## Bug Fixes -* Android Resolver: Fixed error reported when using Jetifier integration - in Unity 2018+ if the target SDK is set to "highest installed". - -# Version 1.2.118 - Jun 18, 2019 -## New Features -* Android Resolver: Added initial - [Jetifier](https://developer.android.com/studio/command-line/jetifier) - integration which simplifies - [migration](ttps://developer.android.com/jetpack/androidx/migrate) - to Jetpack ([AndroidX](https://developer.android.com/jetpack/androidx)) - libraries in cases where all dependencies are managed by the Android - Resolver. - This can be enabled via the `Use Jetifier` option in the - `Assets > Play Services Resolver > Android Resolver > Settings` menu. - Caveats: - - If your project contains legacy Android Support Library .jar and .aar - files, these files will need to be removed and replaced with references to - artifacts on Maven via `*Dependencies.xml` files so that the Jetifier - can map them to Jetpack (AndroidX) libraries. - For example, remove the file `support-v4-27.0.2.jar` and replace it with - `` in a - `*Dependencies.xml` file. - - If your project contains .jar or .aar files that use the legacy Android - Support Libraries, these will need to be moved into a local Maven repo - [See this guide](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html) - and then these files should be removed from your Unity project and instead - referenced via `*Dependencies.xml` files so that the Jetifier can - patch them to reference the Jetpack lirbaries. - -## Bug Fixes -* Android Resolver: Disabled version locking of com.android.support:multidex - does not use the same versioning scheme as other legacy Android support - libraries. -* Version Handler: Made Google.VersionHandler.dll's asset GUID stable across - releases. This faciliates error-free import into projects where - Google.VersionHandler.dll is moved from the default install location. - -# Version 1.2.117 - Jun 12, 2019 -## Bug Fixes -* Android Resolver: Fix copying of .srcaar to .aar files for - mainTemplate.gradle resolution. PluginImporter configuration was previously - not being applied to .aar files unless the Unity project was saved. - -# Version 1.2.116 - Jun 7, 2019 -## Bug Fixes -* Android Resolver: Fixed resolution of Android dependencies without version - specifiers. -* Android Resolver: Fixed Maven repo not found warning in Android Resolver. -* Android Resolver: Fixed Android Player directory not found exception in - Unity 2019.x when the Android Player isn't installed. - -# Version 1.2.115 - May 28, 2019 -## Bug Fixes -* Android Resolver: Fixed exception due to Unity 2019.3.0a4 removing - x86 from the set of supported ABIs. - -# Version 1.2.114 - May 27, 2019 -## New Features -* Android Resolver: Added support for ABI stripping when using - mainTemplate.gradle. This only works with AARs stored in repos - on the local filesystem. - -# Version 1.2.113 - May 24, 2019 -## New Features -* Android Resolver: If local repos are moved, the plugin will search the - project for matching directories in an attempt to correct the error. -* Version Handler: Files can be now targeted to multiple build targets - using multiple "gvh_" asset labels. -## Bug Fixes -* Android Resolver: "implementation" or "compile" are now added correctly - to mainTemplate.gradle in Unity versions prior to 2019. - -# Version 1.2.112 - May 22, 2019 -## New Features -* Android Resolver: Added option to disable addition of dependencies to - mainTemplate.gradle. - See `Assets > Play Services Resolver > Android Resolver > Settings`. -* Android Resolver: Made paths to local maven repositories in - mainTemplate.gradle relative to the Unity project when a project is not - being exported. -## Bug Fixes -* Android Resolver: Fixed builds with mainTemplate.gradle integration in - Unity 2019. -* Android Resolver: Changed dependency inclusion in mainTemplate.gradle to - use "implementation" or "compile" depending upon the version of Gradle - included with Unity. -* Android Resolver: Gracefully handled exceptions if the console encoding - can't be modified. -* Android Resolver: Now gracefully fails if the AndroidPlayer directory - can't be found. - -# Version 1.2.111 - May 9, 2019 -## Bug Fixes -* Version Handler: Fixed invocation of methods with named arguments. -* Version Handler: Fixed occasional hang when the editor is compiling - while activating plugins. - -# Version 1.2.110 - May 7, 2019 -## Bug Fixes -* Android Resolver: Fixed inclusion of some srcaar artifacts in builds with - Gradle builds when using mainTemplate.gradle. - -# Version 1.2.109 - May 6, 2019 -## New Features: -* Added links to documentation from menu. -* Android Resolver: Added option to auto-resolve Android libraries on build. -* Android Resolver: Added support for packaging specs of Android libraries. -* Android Resolver: Pop up a window when displaying Android dependencies. - -## Bug Fixes -* Android Resolver: Support for Unity 2019 Android SDK and JDK install locations -* Android Resolver: e-enable AAR explosion if internal builds are enabled. -* Android Resolver: Gracefully handle exceptions on file deletion. -* Android Resolver: Fixed Android Resolver log spam on load. -* Android Resolver: Fixed save of Android Resolver PromptBeforeAutoResolution - setting. -* Android Resolver: Fixed AAR processing failure when an AAR without - classes.jar is found. -* Android Resolver: Removed use of EditorUtility.DisplayProgressBar which - was occasionally left displayed when resolution had completed. -* Version Handler: Fixed asset rename to disable when a disabled file exists. - -# Version 1.2.108 - May 3, 2019 -## Bug Fixes: -* Version Handler: Fixed occasional hang on startup. - -# Version 1.2.107 - May 3, 2019 -## New Features: -* Version Handler: Added support for enabling / disabling assets that do not - support the PluginImporter, based upon build target selection. -* Android Resolver: Added support for the global specification of maven repos. -* iOS Resolver: Added support for the global specification of Cocoapod sources. - -# Version 1.2.106 - May 1, 2019 -## New Features -* iOS Resolver: Added support for development pods in Xcode project integration - mode. -* iOS Resolver: Added support for source pods with resources in Xcode project - integration mode. - -# Version 1.2.105 - Apr 30, 2019 -## Bug fixes -* Android Resolver: Fixed reference to Java tool path in logs. -* Android and iOS Resolvers: Changed command line execution to emit a warning - rather than throwing an exception and failing, when it is not possible to - change the console input and output encoding to UTF-8. -* Android Resolver: Added menu option and API to delete resolved libraries. -* Android Resolver: Added menu option and API to log the repos and libraries - currently included in the project. -* Android Resolver: If Plugins/Android/mainTemplate.gradle file is present and - Gradle is selected as the build type, resolution will simply patch the file - with Android dependencies specified by plugins in the project. - -# Version 1.2.104 - Apr 10, 2019 -## Bug Fixes -* Android Resolver: Changed Android ABI selection method from using whitelisted - Unity versions to type availability. This fixes an exception on resolution - in some versions of Unity 2017.4. - -# Version 1.2.103 - Apr 2, 2019 -## Bug Fixes -* Android Resolver: Whitelisted Unity 2017.4 and above with ARM64 support. -* Android Resolver: Fixed Java version check to work with Java SE 12 and above. - -# Version 1.2.102 - Feb 13, 2019 -## Bug Fixes -* Android Resolver: Fixed the text overflow on the Android Resolver - prompt before initial run to fit inside the buttons for - smaller screens. - -# Version 1.2.101 - Feb 12, 2019 -## New Features -* Android Resolver: Prompt the user before the resolver runs for the - first time and allow the user to elect to disable from the prompt. -* Android Resolver: Change popup warning when resolver is disabled - to be a console warning. - -# Version 1.2.100 - Jan 25, 2019 -## Bug Fixes -* Android Resolver: Fixed AAR processing sometimes failing on Windows - due to file permissions. - -# Version 1.2.99 - Jan 23, 2019 -## Bug Fixes -* Android Resolver: Improved performance of project property polling. -* Version Handler: Fixed callback of VersionHandler.UpdateCompleteMethods - when the update process is complete. - -# Version 1.2.98 - Jan 9, 2019 -## New Features -* iOS Resolver: Pod declaration properties can now be set via XML pod - references. For example, this can enable pods for a subset of build - configurations. -## Bug Fixes -* iOS Resolver: Fixed incremental builds after local pods support caused - regression in 1.2.96. - -# Version 1.2.97 - Dec 17, 2018 -## Bug Fixes -* Android Resolver: Reduced memory allocation for logic that monitors build - settings when auto-resolution is enabled. If auto-resolution is disabled, - almost all build settings are no longer polled for changes. - -# Version 1.2.96 - Dec 17, 2018 -## Bug Fixes -* Android Resolver: Fixed repacking of AARs to exclude .meta files. -* Android Resolver: Only perform auto-resolution on the first scene while - building. -* Android Resolver: Fixed parsing of version ranges that include whitespace. -* iOS Resolver: Added support for local development pods. -* Version Handler: Fixed Version Handler failing to rename some files. - -# Version 1.2.95 - Oct 23, 2018 -## Bug Fixes: -* Android Resolver: Fixed auto-resolution running in a loop in some scenarios. - -# Version 1.2.94 - Oct 22, 2018 -## Bug Fixes -* iOS Resolver: Added support for PODS_TARGET_SRCROOT in source Cocoapods. - -# Version 1.2.93 - Oct 22, 2018 -## Bug Fixes -* Android Resolver: Fixed removal of Android libraries on auto-resolution when - `*Dependencies.xml` files are deleted. - -# Version 1.2.92 - Oct 2, 2018 -## Bug Fixes -* Android Resolver: Worked around auto-resolution hang on Windows if - resolution starts before compilation is finished. - -# Version 1.2.91 - Sep 27, 2018 -## Bug Fixes -* Android Resolver: Fixed Android Resolution when the selected build target - isn't Android. -* Added C# assembly symbols the plugin to simplify debugging bug reports. - -# Version 1.2.90 - Sep 21, 2018 -## Bug Fixes -* Android Resolver: Fixed transitive dependency selection of version locked - packages. - -# Version 1.2.89 - Aug 31, 2018 -## Bug Fixes -* Fixed FileLoadException in ResolveUnityEditoriOSXcodeExtension an assembly - can't be loaded. - -# Version 1.2.88 - Aug 29, 2018 -## Changed -* Improved reporting of resolution attempts and conflicts found in the Android - Resolver. -## Bug Fixes -* iOS Resolver now correctly handles sample code in CocoaPods. Previously it - would add all sample code to the project when using project level - integration. -* Android Resolver now correctly handles Gradle conflict resolution when the - resolution results in a package that is compatible with all requested - dependencies. - -# Version 1.2.87 - Aug 23, 2018 -## Bug Fixes -* Fixed Android Resolver "Processing AARs" dialog getting stuck in Unity 5.6. - -# Version 1.2.86 - Aug 22, 2018 -## Bug Fixes -* Fixed Android Resolver exception in OnPostProcessScene() when the Android - platform isn't selected. - -# Version 1.2.85 - Aug 17, 2018 -## Changes -* Added support for synchronous resolution in the Android Resolver. - PlayServicesResolver.ResolveSync() now performs resolution synchronously. -* Auto-resolution in the Android Resolver now results in synchronous resolution - of Android dependencies before the Android application build starts via - UnityEditor.Callbacks.PostProcessSceneAttribute. - -# Version 1.2.84 - Aug 16, 2018 -## Bug Fixes -* Fixed Android Resolver crash when the AndroidResolverDependencies.xml - file can't be written. -* Reduced log spam when a conflicting Android library is pinned to a - specific version. - -# Version 1.2.83 - Aug 15, 2018 -## Bug Fixes -* Fixed Android Resolver failures due to an in-accessible AAR / JAR explode - cache file. If the cache can't be read / written the resolver now continues - with reduced performance following recompilation / DLL reloads. -* Fixed incorrect version number in plugin manifest on install. - This was a minor issue since the version handler rewrote the metadata - after installation. - -# Version 1.2.82 - Aug 14, 2018 -## Changed -* Added support for alphanumeric versions in the Android Resolver. - -## Bug Fixes -* Fixed Android Resolver selection of latest duplicated library. -* Fixed Android Resolver conflict resolution when version locked and non-version - locked dependencies are specified. -* Fixed Android Resolver conflict resolution when non-existent artifacts are - referenced. - -# Version 1.2.81 - Aug 9, 2018 -## Bug Fixes -* Fixed editor error that would occur when when - `PlayerSettings.Android.targetArchitectures` was set to - `AndroidArchitecture.All`. - -# Version 1.2.80 - Jul 24, 2018 -## Bug Fixes -* Fixed project level settings incorrectly falling back to system wide settings - when default property values were set. - -# Version 1.2.79 - Jul 23, 2018 -## Bug Fixes -* Fixed AndroidManifest.xml patching on Android Resolver load in Unity 2018.x. - -# Version 1.2.78 - Jul 19, 2018 -## Changed -* Added support for overriding conflicting dependencies. - -# Version 1.2.77 - Jul 19, 2018 -## Changed -* Android Resolver now supports Unity's 2018 ABI filter (i.e arm64-v8a). -* Reduced Android Resolver build option polling frequency. -* Disabled Android Resolver auto-resolution in batch mode. Users now need - to explicitly kick off resolution through the API. -* All Android Resolver and Version Handler dialogs are now disabled in batch - mode. -* Verbose logging for all plugins is now enabled by default in batch mode. -* Version Handler bootstrapper has been improved to no longer call - UpdateComplete multiple times. However, since Unity can still reload the - app domain after plugins have been enabled, users still need to store their - plugin state to persistent storage to handle reloads. - -## Bug Fixes -* Android Resolver no longer incorrectly adds MANIFEST.MF files to AARs. -* Android Resolver auto-resolution jobs are now unscheduled when an explicit - resolve job is started. - -# Version 1.2.76 - Jul 16, 2018 -## Bug Fixes -* Fixed variable replacement in AndroidManifest.xml files in the Android - Resolver. - Version 1.2.75 introduced a regression which caused all variable replacement - to replace the *entire* property value rather than the component of the - property that referenced a variable. For example, - given "applicationId = com.my.app", "${applicationId}.foo" would be - incorrectly expanded as "com.my.app" rather than "com.my.app.foo". This - resulted in numerous issues for Android builds where content provider - initialization would fail and services may not start. - -## Changed -* Gradle prebuild experimental feature has been removed from the Android - Resolver. The feature has been broken for some time and added around 8MB - to the plugin size. -* Added better support for execution of plugin components in batch mode. - In batch mode UnityEditor.update is sometimes never called - like when a - single method is executed - so the new job scheduler will execute all jobs - synchronously from the main thread. - -# Version 1.2.75 - Jun 20, 2018 -## New Features -* Android Resolver now monitors the Android SDK path when - auto-resolution is enabled and triggers resolution when the path is - modified. - -## Changed -* Android auto-resolution is now delayed by 3 seconds when the following build - settings are changed: - - Target ABI. - - Gradle build vs. internal build. - - Project export. -* Added a progress bar display when AARs are being processed during Android - resolution. - -## Bug Fixes -* Fixed incorrect Android package version selection when a mix of - version-locked and non-version-locked packages are specified. -* Fixed non-deterministic Android package version selection to select - the highest version of a specified package rather than the last - package specification passed to the Gradle resolution script. - -# Version 1.2.74 - Jun 19, 2018 -## New Features -* Added workaround for broken AndroidManifest.xml variable replacement in - Unity 2018.x. By default ${applicationId} variables will be replaced by - the bundle ID in the Plugins/Android/AndroidManifest.xml file. The - behavior can be disabled via the Android Resolver settings menu. - -# Version 1.2.73 - May 30, 2018 -## Bug Fixes -* Fixed spurious warning message about missing Android plugins directory on - Windows. - -# Version 1.2.72 - May 23, 2018 -## Bug Fixes -* Fixed spurious warning message about missing Android plugins directory. - -# Version 1.2.71 - May 10, 2018 -## Bug Fixes -* Fixed resolution of Android dependencies when the `Assets/Plugins/Android` - directory is named in a different case e.g `Assets/plugins/Android`. - -# Version 1.2.70 - May 7, 2018 -## Bug Fixes -* Fixed bitcode flag being ignored for iOS pods. - -# Version 1.2.69 - May 7, 2018 -## Bug Fixes -* Fixed escaping of local repository paths in Android Resolver. - -# Version 1.2.68 - May 3, 2018 -## Changes -* Added support for granular builds of Google Play Services. - -# Version 1.2.67 - May 1, 2018 -## Changes -* Improved support for iOS source-only pods in Unity 5.5 and below. - -# Version 1.2.66 - April 27, 2018 -## Bug Fixes -* Fixed Version Handler renaming of Linux libraries with hyphens in filenames. - Previously, libraries named Foo-1.2.3.so were not being renamed to - libFoo-1.2.3.so on Linux which could break native library loading on some - versions of Unity. - -# Version 1.2.65 - April 26, 2018 -## Bug Fixes -* Fix CocoaPods casing in logs and comments. - -# Version 1.2.64 - Mar 16, 2018 -## Bug Fixes -* Fixed bug in download_artifacts.gradle (used by Android Resolver) which - reported a failure if required artifacts already exist. - -# Version 1.2.63 - Mar 15, 2018 -## Bug Fixes -* Fixed iOS Resolver include search paths taking precedence over system headers - when using project level resolution. -* Fixed iOS Resolver includes relative to library root, when using project level - resolution. - -# Version 1.2.62 - Mar 12, 2018 -## Changes -* Improved error reporting when a file can't be moved to trash by the - Version Handler. -## Bug Fixes -* Fixed Android Resolver throwing NullReferenceException when the Android SDK - path isn't set. -* Fixed Version Handler renaming files with underscores if the - "Rename to Canonical Filenames" setting is enabled. - -# Version 1.2.61 - Jan 22, 2018 -## Bug Fixes -* Fixed Android Resolver reporting non-existent conflicting dependencies when - Gradle build system is enabled. - -# Version 1.2.60 - Jan 12, 2018 -## Changes -* Added support for Maven / Ivy version specifications for Android packages. -* Added support for Android SNAPSHOT packages. - -## Bug Fixes -* Fixed Openjdk version check. -* Fixed non-deterministic Android package resolution when two packages contain - an artifact with the same name. - -# Version 1.2.59 - Oct 19, 2017 -## Bug Fixes -* Fixed execution of Android Gradle resolution script when it's located - in a path with whitespace. - -# Version 1.2.58 - Oct 19, 2017 -## Changes -* Removed legacy resolution method from Android Resolver. - It is now only possible to use the Gradle or Gradle prebuild resolution - methods. - -# Version 1.2.57 - Oct 18, 2017 -## Bug Fixes -* Updated Gradle wrapper to 4.2.1 to fix issues using Gradle with the - latest Openjdk. -* Android Gradle resolution now also uses gradle.properties to pass - parameters to Gradle in an attempt to workaround problems with - command line argument parsing on Windows 10. - -# Version 1.2.56 - Oct 12, 2017 -## Bug Fixes -* Fixed Gradle artifact download with non-version locked artifacts. -* Changed iOS resolver to only load dependencies at build time. - -# Version 1.2.55 - Oct 4, 2017 -## Bug Fixes -* Force Android Resolution when the "Install Android Packages" setting changes. - -# Version 1.2.54 - Oct 4, 2017 -## Bug Fixes -* Fixed execution of command line tools on Windows when the path to the tool - contains a single quote (apostrophe). In this case we fallback to executing - the tool via the system shell. - -# Version 1.2.53 - Oct 2, 2017 -## New Features -* Changed Android Resolver "resolution complete" dialog so that it now displays - failures. -* Android Resolver now detects conflicting libraries that it does not manage - warning the user if they're newer than the managed libraries and prompting - the user to clean them up if they're older or at the same version. - -## Bug Fixes -* Improved Android Resolver auto-resolution speed. -* Fixed bug in the Gradle Android Resolver which would result in resolution - succeeding when some dependencies are not found. - -# Version 1.2.52 - Sep 25, 2017 -## New Features -* Changed Android Resolver's Gradle resolution to resolve conflicting - dependencies across Google Play services and Android Support library packages. - -# Version 1.2.51 - Sep 20, 2017 -## Changes -* Changed iOS Resolver to execute the CocoaPods "pod" command via the shell - by default. Some developers customize their shell environment to use - custom ssh certs to access internal git repositories that host pods so - executing "pod" via the shell will work for these scenarios. - The drawback of executing "pod" via the shell could potentially cause - users problems if they break their shell environment. Though users who - customize their shell environments will be able to resolve these issues. - -# Version 1.2.50 - Sep 18, 2017 -## New Features -* Added option to disable the Gradle daemon in the Android Resolver. - This daemon is now disabled by default as some users are getting into a state - where multiple daemon instances are being spawned when changing dependencies - which eventually results in Android resolution failing until all daemon - processes are manually killed. - -## Bug Fixes -* Android resolution is now always executed if the user declines the update - of their Android SDK. This ensure users can continue to use out of date - Android SDK packages if they desire. - -# Version 1.2.49 - Sep 18, 2017 -## Bug Fixes -* Removed modulemap parsing in iOS Resolver. - The framework *.modulemap did not need to be parsed by the iOS Resolver - when injecting Cocoapods into a Xcode project. Simply adding a modular - framework to a Xcode project results in Xcode's Clang parsing the associated - modulemap and injecting any compile and link flags into the build process. - -# Version 1.2.48 - Sep 12, 2017 -## New Features -* Changed settings to be per-project by default. - -## Bug Fixes -* Added Google maven repository to fix GradlePrebuild resolution with Google - components. -* Fixed Android Resolution failure with spaces in paths. - -# Version 1.2.47 - Aug 29, 2017 -## New Features -* Android and iOS dependencies can now be specified using *Dependencies.xml - files. This is now the preferred method for registering dependencies, - we may remove the API for dependency addition in future. -* Added "Reset to Defaults" button to each settings dialog to restore default - settings. -* Android Resolver now validates the configured JDK is new enough to build - recently released Android libraries. -## Bug Fixes -* Fixed a bug that caused dependencies with the "LATEST" version specification - to be ignored when using the Gradle mode of the Android Resolver. -* Fixed a race condition when running Android Resolution. -* Fixed Android Resolver logging if a PlayServicesSupport instance is created - with no logging enabled before the Android Resolver is initialized. -* Fixed iOS resolver dialog in Unity 4. -* Fixed iOS Cocoapod Xcode project integration in Unity 4. - -# Version 1.2.46 - Aug 22, 2017 -## Bug Fixes -* GradlePrebuild Android resolver on Windows now correctly locates dependent - data files. - -# Version 1.2.45 - Aug 22, 2017 -## Bug Fixes -* Improved Android package auto-resolution and fixed clean up of stale - dependencies when using Gradle dependency resolution. - -# Version 1.2.44 - Aug 21, 2017 -## Bug Fixes -* Enabled autoresolution for Gradle Prebuild. -* Made the command line dialog windows have selectable text. -* Fixed incorrect "Android Settings" dialog disabled groups. -* Updated PlayServicesResolver android platform detection to use the package - manager instead of the 'android' tool. -* UnityCompat reflection methods 'GetAndroidPlatform' and - 'GetAndroidBuildToolsVersion' are now Obsolete due to dependence on the - obsolete 'android' build tool. - -# Version 1.2.43 - Aug 18, 2017 -## Bug Fixes -* Fixed Gradle resolution in the Android Resolver when running - PlayServicesResolver.Resolve() in parallel or spawning multiple - resolutions before the previous resolve completed. - -# Version 1.2.42 - Aug 17, 2017 -## Bug Fixes -* Fixed Xcode project level settings not being applied by IOS Resolver when - Xcode project pod integration is enabled. - -# Version 1.2.41 - Aug 15, 2017 -## Bug Fixes -* IOS Resolver's Xcode workspace pod integration is now disabled when Unity - Cloud Build is detected. Unity Cloud Build does not follow the same build - process as the Unity editor and fails to open the generated xcworkspace at - this time. - -# Version 1.2.40 - Aug 15, 2017 -## Bug Fixes -* Moved Android Resolver Gradle Prebuild scripts into Google.JarResolver.dll. - They are now extracted from the DLL when required. -* AARs / JARs are now cleaned up when switching the Android resolution - strategy. - -# Version 1.2.39 - Aug 10, 2017 -## New Features -* Android Resolver now supports resolution with Gradle. This enables support - for non-local artifacts. -## Bug Fixes -* Android Resolver's Gradle Prebuild now uses Android build tools to determine - the Android platform tools version rather than relying upon internal Unity - APIs. -* Android Resolver's Gradle Prebuild now correctly strips binaries that are - not required for the target ABI. - -# Version 1.2.38 - Aug 7, 2017 -## Bug Fixes -* Fixed an issue in VersionHandler where disabled targets are ignored if - the "Any Platform" flag is set on a plugin DLL. - -# Version 1.2.37 - Aug 3, 2017 -## New Features -* Exposed GooglePlayServices.PlayServicesResolver.Resolve() so that it's - possible for a script to be notified when AAR / Jar resolution is complete. - This makes it easier to setup a project to build from the command line. - -# Version 1.2.36 - Aug 3, 2017 -## New Features -* VersionHandler.UpdateCompleteMethods allows a user to provide a list of - methods to be called when VersionHandlerImpl has completed an update. - This makes it easier to import a plugin and wait for VersionHandler to - execute prior executing a build. - -# Version 1.2.35 - Jul 28, 2017 -## New Features -* VersionHandler will now rename Linux libraries so they can target Unity - versions that require different file naming. Libraries need to be labelled - gvh_linuxlibname-${basename} in order to be considered for renaming. - e.g gvh\_linuxlibname-MyLib will be named MyLib.so in Unity 5.5 and below and - libMyLib.so in Unity 5.6 and above. - -# Version 1.2.34 - Jul 28, 2017 -## Bug Fixes -* Made VersionHandler bootstrap module more robust when calling static - methods before the implementation DLL is loaded. - -# Version 1.2.33 - Jul 27, 2017 -## New Features -* Added a bootstrap module for VersionHandler so the implementation - of the VersionHandler module can be versioned without resulting in - a compile error when imported at different versions across multiple - plugins. - -# Version 1.2.32 - Jul 20, 2017 -## New Features -* Added support for build target selection based upon .NET framework - version in the VersionHandler. - When applying either gvh\_dotnet-3.5 or gvh\_dotnet-4.5 labels to - assets, the VersionHandler will only enable the asset for the - specified set of build targets when the matching .NET framework version - is selected in Unity 2017's project settings. This allows assets - to be provided in a plugin that need to differ based upon .NET version. - -# Version 1.2.31 - Jul 5, 2017 -## Bug Fixes -* Force expansion of AARs with native components when using Unity 2017 - with the internal build system. In contrast to Unity 5.x, Unity 2017's - internal build system does not include native libraries included in AARs. - Forcing expansion of AARs with native components generates an - Ant / Eclipse project for each AAR which is correctly included by Unity - 2017's internal build system. - -# Version 1.2.30 - Jul 5, 2017 -## Bug Fixes -* Fixed Cocoapods being installed when the build target isn't iOS. -* Added support for malformed AARs with missing classes.jar. - -# Version 1.2.29 - Jun 16, 2017 -## New Features -* Added support for the Android sdkmanager tool. - -# Version 1.2.28 - Jun 8, 2017 -## Bug Fixes -* Fixed non-shell command line execution (regression from - Cocoapod installation patch). - -# Version 1.2.27 - Jun 7, 2017 -## Bug Fixes -* Added support for stdout / stderr redirection when executing - commands in shell mode. - This fixes CocoaPod tool installation when shell mode is - enabled. -* Fixed incremental builds when additional sources are specified - in the Podfile. - -# Version 1.2.26 - Jun 7, 2017 -## Bug Fixes -* Fixed a crash when importing Version Handler into Unity 4.7.x. - -# Version 1.2.25 - Jun 7, 2017 -## Bug Fixes -* Fixed an issue in the Jar Resolver which incorrectly notified - event handlers of bundle ID changes when the currently selected - (not active) build target changed in Unity 5.6 and above. - -# Version 1.2.24 - Jun 6, 2017 -## New Features -* Added option to control file renaming in Version Handler settings. - Disabling file renaming (default option) significantly increases - the speed of file version management operations with the downside - that any files that are referenced directly by canonical filename - rather than asset ID will no longer be valid. -* Improved logging in the Version Handler. -## Bug Fixes -* Fixed an issue in the Version Handler which caused it to not - re-enable plugins when re-importing a custom package with disabled - version managed files. - -# Version 1.2.23 - May 26, 2017 -## Bug Fixes -* Fixed a bug with gradle prebuild resolver on windows. - -# Version 1.2.22 - May 19, 2017 -## Bug Fixes -* Fixed a bug in the iOS resolver with incremental builds. -* Fixed misdetection of Cocoapods support with Unity beta 5.6. - -# Version 1.2.21 - May 8, 2017 -## Bug Fixes -* Fix for https://github.com/googlesamples/unity-jar-resolver/issues/48 - Android dependency version number parsing when "-alpha" (etc.) are - included in dependency (AAR / JAR) versions. - -# Version 1.2.20 - May 8, 2017 -## Bug Fixes -* Attempted to fix - https://github.com/googlesamples/unity-jar-resolver/issues/48 - where a NullReferenceException could occur if a target file does not - have a valid version string. - -# Version 1.2.19 - May 4, 2017 -## Bug Fixes -* Fixed Jar Resolver exploding and deleting AAR files it isn't managing. - -# Version 1.2.18 - May 4, 2017 -## New Features -* Added support for preserving Unity pods such as when GVR is enabled. - -# Version 1.2.17 - Apr 20, 2017 -## Bug Fixes -* Fixed auto-resolution when an Android application ID is modified. - -# Version 1.2.16 - Apr 17, 2017 -## Bug Fixes -* Fixed Unity version number parsing on machines with a locale that uses - "," for decimal points. -* Fixed null reference exception if JDK path isn't set. - -# Version 1.2.15 - Mar 17, 2017 -## New Features -* Added warning when the Jar Resolver's background resolution is disabled. -## Bug Fixes -* Fixed support of AARs with native libraries when using Gradle. -* Fixed extra repository paths when resolving dependencies. - -# Version 1.2.14 - Mar 7, 2017 -## New Features -* Added experimental Android resolution using Gradle. - This alternative resolver supports proguard stripping with Unity's - internal build system. -* Added Android support for single ABI builds when using AARs include - native libraries. -* Disabled Android resolution on changes to all .cs and .js files. - File patterns that are monitored for auto-resolution can be added - using PlayServicesResolver.AddAutoResolutionFilePatterns(). -* Added tracking of resolved AARs and JARs so they can be cleaned up - if they're no longer referenced by a project. -* Added persistence of AAR / JAR version replacement for each Unity - session. -* Added settings dialog to the iOS resolver. -* Integrated Cocoapod tool installation in the iOS resolver. -* Added option to run pod tool via the shell. -## Bug Fixes -* Fixed build of some source Cocoapods (e.g Protobuf). -* VersionHandler no longer prompts to delete obsolete manifests. -* iOS resolver handles Cocoapod installation when using Ruby < 2.2.2. -* Added workaround for package version selection when including - Google Play Services on Android. -* Fixed support for pods that reference static libraries. -* Fixed support for resource-only pods. - -# Version 1.2.12 - Feb 14, 2017 -## Bug Fixes -* Fixed re-explosion of AARs when the bundle ID is modified. - -# Version 1.2.11 - Jan 30, 2017 -## New Features -* Added support for Android Studio builds. -* Added support for native (C/C++) shared libraries in AARs. - -# Version 1.2.10 - Jan 11, 2017 -## Bug Fixes -* Fixed SDK manager path retrieval. -* Also, report stderr when it's not possible to run the "pod" tool. -* Handle exceptions thrown by Unity.Cecil on asset rename -* Fixed IOSResolver to handle PlayerSettings.iOS.targetOSVersionString - -# Version 1.2.9 - Dec 7, 2016 -## Bug Fixes -* Improved error reporting when "pod repo update" fails. -* Added detection of xml format xcode projects generated by old Cocoapods - installations. - -# Version 1.2.8 - Dec 6, 2016 -## Bug Fixes -* Increased speed of JarResolver resolution. -* Fixed JarResolver caches getting out of sync with requested dependencies - by removing the caches. -* Fixed JarResolver explode cache always being rewritten even when no - dependencies change. - -# Version 1.2.7 - Dec 2, 2016 -## Bug Fixes -* Fixed VersionHandler build errors with Unity 5.5, due to the constantly - changing BuildTarget enum. -* Added support for Unity configured JDK Path rather than requiring - JAVA_HOME to be set in the Jar Resolver. - -# Version 1.2.6 - Nov 15, 2016 -## Bug Fixes -* Fixed IOSResolver errors when iOS support is not installed. -* Added fallback to "pod" executable search which queries the Ruby Gems - package manager for the binary install location. - -# Version 1.2.5 - Nov 3, 2016 -## Bug Fixes -* Added crude support for source only Cocoapods to the IOSResolver. - -# Version 1.2.4 - Oct 27, 2016 -## Bug Fixes -* Automated resolution of out of date pod repositories. - -# Version 1.2.3 - Oct 25, 2016 -## Bug Fixes -* Fixed exception when reporting conflicting dependencies. - -# Version 1.2.2 - Oct 17, 2016 -## Bug Fixes -* Fixed issue working with Unity 5.5 -* Fixed issue with PlayServicesResolver corrupting other iOS dependencies. -* Updated build script to use Unity distributed tools for building. - -# Version 1.2.1 - Jul 25, 2016 -## Bug Fixes -* Removed 1.2 Resolver and hardcoded whitelist of AARs to expand. -* Improved error reporting when the "jar" executable can't be found. -* Removed the need to set JAVA_HOME if "jar" is in the user's path. -* Fixed spurious copying of partially matching AARs. -* Changed resolver to only copy / expand when source AARs change. -* Auto-resolution of dependencies is now performed when the Android - build target is selected. - -## New Features -* Expand AARs that contain manifests with variable expansion like - ${applicationId}. -* Added optional logging in the JarResolverLib module. -* Integration with the Android SDK manager for dependencies that - declare required Android SDK packages. - -# Version 1.2.0 - May 11 2016 -## Bug Fixes -* Handles resolving dependencies when the artifacts are split across 2 repos. -* #4 Misdetecting version for versions like 1.2-alpha. These are now string - compared if alphanumeric -* Removed resolver creation via reflection since it did not work all the time. - Now a resolver needs to be loaded externally (which is existing behavior). - -## New Features -* Expose PlayServicesResolver properties to allow for script access. -* Explodes firebase-common and firebase-measurement aar files to support - ${applicationId} substitution. - -# Version 1.1.1 - 25 Feb 2016 -## Bug Fixes -* #1 Spaces in project path not handled when exploding Aar file. -* #2 Script compilation error: TypeLoadException. - -# Version 1.1.0 - 5 Feb 2016 -## New Features -* Adds friendly alert when JAVA_HOME is not set on Windows platforms. -* Adds flag for disabling background resolution. -* Expands play-services-measurement and replaces ${applicationId} with the - bundle Id. - - ## Bug Fixes -* Fixes infinite loop of resolution triggered by resolution. diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md.meta deleted file mode 100644 index 93230e5..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/CHANGELOG.md.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: deafbeef1ed04f639e3195087b6d2e9f -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/CHANGELOG.md -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll deleted file mode 100755 index bcf0890..0000000 Binary files a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll and /dev/null differ diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta deleted file mode 100644 index 6781b96..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -fileFormatVersion: 2 -guid: 17e39196248d458daa69b514bc09b6a7 -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/Google.VersionHandler.dll -- gvhp_targets-editor -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE deleted file mode 100755 index 6258cc4..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE +++ /dev/null @@ -1,245 +0,0 @@ -Copyright (C) 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -==================================================================================================== -This package uses MiniJSON - -Copyright (c) 2013 Calvin Rien - -Based on the JSON parser by Patrick van Bergen -http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html - -Simplified it so that it doesn't throw exceptions -and can be used in Unity iPhone with maximum code stripping. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE.meta deleted file mode 100644 index 4de234f..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/LICENSE.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 61e923e8fff245a9bf5cfcf0774e75df -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/LICENSE -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md deleted file mode 100755 index cbc98e1..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md +++ /dev/null @@ -1,768 +0,0 @@ -External Dependency Manager for Unity -======== - -# Overview - -The External Dependency Manager for Unity (EDM4U) -(formerly Play Services Resolver / Jar Resolver) is intended to be used by any -Unity plugin that requires: - - * Android specific libraries (e.g - [AARs](https://developer.android.com/studio/projects/android-library.html)). - * iOS [CocoaPods](https://cocoapods.org/). - * Version management of transitive dependencies. - * Management of Package Manager (PM) Registries. - -Updated releases are available on -[GitHub](https://github.com/googlesamples/unity-jar-resolver) - -# Background - -Many Unity plugins have dependencies upon Android specific libraries, iOS -CocoaPods, and sometimes have transitive dependencies upon other Unity plugins. -This causes the following problems: - - * Integrating platform specific (e.g Android and iOS) libraries within a - Unity project can be complex and a burden on a Unity plugin maintainer. - * The process of resolving conflicting dependencies on platform specific - libraries is pushed to the developer attempting to use a Unity plugin. - The developer trying to use you plugin is very likely to give up when - faced with Android or iOS specific build errors. - * The process of resolving conflicting Unity plugins (due to shared Unity - plugin components) is pushed to the developer attempting to use your Unity - plugin. In an effort to resolve conflicts, the developer will very likely - attempt to resolve problems by deleting random files in your plugin, - report bugs when that doesn't work and finally give up. - -EDM provides solutions for each of these problems. - -## Android Dependency Management - -The *Android Resolver* component of this plugin will download and integrate -Android library dependencies and handle any conflicts between plugins that share -the same dependencies. - -Without the Android Resolver, typically Unity plugins bundle their AAR and -JAR dependencies, e.g. a Unity plugin `SomePlugin` that requires the Google -Play Games Android library would redistribute the library and its transitive -dependencies in the folder `SomePlugin/Android/`. When a user imports -`SomeOtherPlugin` that includes the same libraries (potentially at different -versions) in `SomeOtherPlugin/Android/`, the developer using `SomePlugin` and -`SomeOtherPlugin` will see an error when building for Android that can be hard -to interpret. - -Using the Android Resolver to manage Android library dependencies: - - * Solves Android library conflicts between plugins. - * Handles all of the various processing steps required to use Android - libraries (AARs, JARs) in Unity 4.x and above projects. Almost all - versions of Unity have - at best - partial support for AARs. - * (Experimental) Supports minification of included Java components without - exporting a project. - -## iOS Dependency Management - -The *iOS Resolver* component of this plugin integrates with -[CocoaPods](https://cocoapods.org/) to download and integrate iOS libraries -and frameworks into the Xcode project Unity generates when building for iOS. -Using CocoaPods allows multiple plugins to utilize shared components without -forcing developers to fix either duplicate or incompatible versions of -libraries included through multiple Unity plugins in their project. - -## Package Manager Registry Setup - -The [Package Manager](https://docs.unity3d.com/Manual/Packages.html) -(PM) makes use of [NPM](https://www.npmjs.com/) registry servers for package -hosting and provides ways to discover, install, upgrade and uninstall packages. -This makes it easier for developers to manage plugins within their projects. - -However, installing additional package registries requires a few manual steps -that can potentially be error prone. The *Package Manager Resolver* -component of this plugin integrates with -[PM](https://docs.unity3d.com/Manual/Packages.html) to provide a way to -auto-install PM package registries when a `.unitypackage` is installed which -allows plugin maintainers to ship a `.unitypackage` that can provide access -to their own PM registry server to make it easier for developers to -manage their plugins. - -## Unity Plugin Version Management - -Finally, the *Version Handler* component of this plugin simplifies the process -of managing transitive dependencies of Unity plugins and each plugin's upgrade -process. - -For example, without the Version Handler plugin, if: - - * Unity plugin `SomePlugin` includes `EDM4U` plugin at - version 1.1. - * Unity plugin `SomeOtherPlugin` includes `EDM4U` - plugin at version 1.2. - -The version of `EDM4U` included in the developer's project depends upon the -order the developer imports `SomePlugin` or `SomeOtherPlugin`. - -This results in: - - * `EDM4U` at version 1.2, if `SomePlugin` is imported then `SomeOtherPlugin` - is imported. - * `EDM4U` at version 1.1, if `SomeOtherPlugin` is imported then - `SomePlugin` is imported. - -The Version Handler solves the problem of managing transitive dependencies by: - - * Specifying a set of packaging requirements that enable a plugin at - different versions to be imported into a Unity project. - * Providing activation logic that selects the latest version of a plugin - within a project. - -When using the Version Handler to manage `EDM4U` included in `SomePlugin` and -`SomeOtherPlugin`, from the prior example, version 1.2 will always be the -version activated in a developer's Unity project. - -Plugin creators are encouraged to adopt this library to ease integration for -their customers. For more information about integrating EDM4U -into your own plugin, see the [Plugin Redistribution](#plugin-redistribution) -section of this document. - -# Analytics - -The External Dependency Manager for Unity plugin by default logs usage to Google -Analytics. The purpose of the logging is to quantitatively measure the usage of -functionality, to gather reports on integration failures and to inform future -improvements to the developer experience of the External Dependency Manager -plugin. Note that the analytics collected are limited to the scope of the EDM4U -plugin’s usage. - -For details of what is logged, please refer to the usage of -`EditorMeasurement.Report()` in the source code. - -# Requirements - -The *Android Resolver* and *iOS Resolver* components of the plugin only work -with Unity version 4.6.8 or higher. - -The *Version Handler* component only works with Unity 5.x or higher as it -depends upon the `PluginImporter` UnityEditor API. - -The *Package Manager Resolver* component only works with -Unity 2018.4 or above, when -[scoped registry](https://docs.unity3d.com/Manual/upm-scoped.html) -support was added to the Package Manager. - -# Getting Started - -Before you import EDM4U into your plugin project, you first -need to consider whether you intend to *redistribute* `EDM4U` -along with your own plugin. - -## Plugin Redistribution - -If you're a plugin maintainer, redistributing `EDM4U` inside your own plugin -will ease the integration process for your users, by resolving dependency -conflicts between your plugin and other plugins in a user's project. - -If you wish to redistribute `EDM4U` inside your plugin, -you **must** follow these steps when importing the -`external-dependency-manager-*.unitypackage`, and when exporting your own plugin -package: - - 1. Import the `external-dependency-manager-*.unitypackage` into your plugin - project by - [running Unity from the command line](https://docs.unity3d.com/Manual/CommandLineArguments.html), ensuring that - you add the `-gvh_disable` option. - 1. Export your plugin by [running Unity from the command line](https://docs.unity3d.com/Manual/CommandLineArguments.html), ensuring that - you: - - Include the contents of the `Assets/PlayServicesResolver` and - `Assets/ExternalDependencyManager` directory. - - Add the `-gvh_disable` option. - -You **must** specify the `-gvh_disable` option in order for the Version -Handler to work correctly! - -For example, the following command will import the -`external-dependency-manager-1.2.46.0.unitypackage` into the project -`MyPluginProject` and export the entire Assets folder to -`MyPlugin.unitypackage`: - -``` -Unity -gvh_disable \ - -batchmode \ - -importPackage external-dependency-manager-1.2.46.0.unitypackage \ - -projectPath MyPluginProject \ - -exportPackage Assets MyPlugin.unitypackage \ - -quit -``` - -### Background - -The *Version Handler* component relies upon deferring the load of editor DLLs -so that it can run first and determine the latest version of a plugin component -to activate. The build of `EDM4U` plugin has Unity asset metadata that is -configured so that the editor components are not initially enabled when it's -imported into a Unity project. To maintain this configuration when importing -the `external-dependency-manager.unitypackage` into a Unity plugin project, you -*must* specify the command line option `-gvh_disable` which will prevent the -Version Handler component from running and changing the Unity asset metadata. - -# Android Resolver Usage - -The Android Resolver copies specified dependencies from local or remote Maven -repositories into the Unity project when a user selects Android as the build -target in the Unity editor. - - 1. Add the `external-dependency-manager-*.unitypackage` to your plugin - project (assuming you are developing a plugin). If you are redistributing - EDM4U with your plugin, you **must** follow the - import steps in the [Getting Started](#getting-started) section! - - 2. Copy and rename the - [SampleDependencies.xml](https://github.com/googlesamples/unity-jar-resolver/blob/master/sample/Assets/ExternalDependencyManager/Editor/SampleDependencies.xml) - file into your plugin and add the dependencies your plugin requires. - - The XML file just needs to be under an `Editor` directory and match the - name `*Dependencies.xml`. For example, - `MyPlugin/Editor/MyPluginDependencies.xml`. - - 3. Follow the steps in the [Getting Started](#getting-started) - section when you are exporting your plugin package. - -For example, to add the Google Play Games library -(`com.google.android.gms:play-services-games` package) at version `9.8.0` to -the set of a plugin's Android dependencies: - -``` - - - - - extra-google-m2repository - - - - -``` - -The version specification (last component) supports: - - * Specific versions e.g `9.8.0` - * Partial matches e.g `9.8.+` would match 9.8.0, 9.8.1 etc. choosing the most - recent version. - * Latest version using `LATEST` or `+`. We do *not* recommend using this - unless you're 100% sure the library you depend upon will not break your - Unity plugin in future. - -The above example specifies the dependency as a component of the Android SDK -manager such that the Android SDK manager will be executed to install the -package if it's not found. If your Android dependency is located on Maven -central it's possible to specify the package simply using the `androidPackage` -element: - -``` - - - - - -``` - -## Auto-resolution - -By default the Android Resolver automatically monitors the dependencies you have -specified and the `Plugins/Android` folder of your Unity project. The -resolution process runs when the specified dependencies are not present in your -project. - -The *auto-resolution* process can be disabled via the -`Assets > External Dependency Manager > Android Resolver > Settings` menu. - -Manual resolution can be performed using the following menu options: - - * `Assets > External Dependency Manager > Android Resolver > Resolve` - * `Assets > External Dependency Manager > Android Resolver > Force Resolve` - -## Deleting libraries - -Resolved packages are tracked via asset labels by the Android Resolver. -They can easily be deleted using the -`Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries` -menu item. - -## Android Manifest Variable Processing - -Some AAR files (for example play-services-measurement) contain variables that -are processed by the Android Gradle plugin. Unfortunately, Unity does not -perform the same processing when using Unity's Internal Build System, so the -Android Resolver plugin handles known cases of this variable substitution -by exploding the AAR into a folder and replacing `${applicationId}` with the -`bundleID`. - -Disabling AAR explosion and therefore Android manifest processing can be done -via the `Assets > External Dependency Manager > Android Resolver > Settings` -menu. You may want to disable explosion of AARs if you're exporting a project -to be built with Gradle / Android Studio. - -## ABI Stripping - -Some AAR files contain native libraries (.so files) for each ABI supported -by Android. Unfortunately, when targeting a single ABI (e.g x86), Unity does -not strip native libraries for unused ABIs. To strip unused ABIs, the Android -Resolver plugin explodes an AAR into a folder and removes unused ABIs to -reduce the built APK size. Furthermore, if native libraries are not stripped -from an APK (e.g you have a mix of Unity's x86 library and some armeabi-v7a -libraries) Android may attempt to load the wrong library for the current -runtime ABI completely breaking your plugin when targeting some architectures. - -AAR explosion and therefore ABI stripping can be disabled via the -`Assets > External Dependency Manager > Android Resolver > Settings` menu. -You may want to disable explosion of AARs if you're exporting a project to be -built with Gradle / Android Studio. - -## Resolution Strategies - -By default the Android Resolver will use Gradle to download dependencies prior -to integrating them into a Unity project. This works with Unity's internal -build system and Gradle / Android Studio project export. - -It's possible to change the resolution strategy via the -`Assets > External Dependency Manager > Android Resolver > Settings` menu. - -### Download Artifacts with Gradle - -Using the default resolution strategy, the Android resolver executes the -following operations: - - - Remove the result of previous Android resolutions. - e.g Delete all files and directories labeled with "gpsr" under - `Plugins/Android` from the project. - - Collect the set of Android dependencies (libraries) specified by a - project's `*Dependencies.xml` files. - - Run `download_artifacts.gradle` with Gradle to resolve conflicts and, - if successful, download the set of resolved Android libraries (AARs, JARs). - - Process each AAR / JAR so that it can be used with the currently selected - Unity build system (e.g Internal vs. Gradle, Export vs. No Export). - This involves patching each reference to `applicationId` in the - AndroidManifest.xml with the project's bundle ID. This means resolution - must be run if the bundle ID is changed again. - - Move the processed AARs to `Plugins/Android` so they will be included when - Unity invokes the Android build. - -### Integrate into mainTemplate.gradle - -Unity 5.6 introduced support for customizing the `build.gradle` used to build -Unity projects with Gradle. When the *Patch mainTemplate.gradle* setting is -enabled, rather than downloading artifacts before the build, Android resolution -results in the execution of the following operations: - - - Remove the result of previous Android resolutions. - e.g Delete all files and directories labeled with "gpsr" under - `Plugins/Android` from the project and remove sections delimited with - `// Android Resolver * Start` and `// Android Resolver * End` lines. - - Collect the set of Android dependencies (libraries) specified by a - project's `*Dependencies.xml` files. - - Rename any `.srcaar` files in the build to `.aar` and exclude them from - being included directly by Unity in the Android build as - `mainTemplate.gradle` will be patched to include them instead from their - local maven repositories. - - Inject the required Gradle repositories into `mainTemplate.gradle` at the - line matching the pattern - `.*apply plugin: 'com\.android\.(application|library)'.*` or the section - starting at the line `// Android Resolver Repos Start`. - If you want to control the injection point in the file, the section - delimited by the lines `// Android Resolver Repos Start` and - `// Android Resolver Repos End` should be placed in the global scope - before the `dependencies` section. - - Inject the required Android dependencies (libraries) into - `mainTemplate.gradle` at the line matching the pattern `***DEPS***` or - the section starting at the line `// Android Resolver Dependencies Start`. - If you want to control the injection point in the file, the section - delimited by the lines `// Android Resolver Dependencies Start` and - `// Android Resolver Dependencies End` should be placed in the - `dependencies` section. - - Inject the packaging options logic, which excludes architecture specific - libraries based upon the selected build target, into `mainTemplate.gradle` - at the line matching the pattern `android +{` or the section starting at - the line `// Android Resolver Exclusions Start`. - If you want to control the injection point in the file, the section - delimited by the lines `// Android Resolver Exclusions Start` and - `// Android Resolver Exclusions End` should be placed in the global - scope before the `android` section. - -## Dependency Tracking - -The Android Resolver creates the -`ProjectSettings/AndroidResolverDependencies.xml` to quickly determine the set -of resolved dependencies in a project. This is used by the auto-resolution -process to only run the expensive resolution process when necessary. - -## Displaying Dependencies - -It's possible to display the set of dependencies the Android Resolver -would download and process in your project via the -`Assets > External Dependency Manager > Android Resolver > Display Libraries` -menu item. - -# iOS Resolver Usage - -The iOS resolver component of this plugin manages -[CocoaPods](https://cocoapods.org/). A CocoaPods `Podfile` is generated and -the `pod` tool is executed as a post build process step to add dependencies -to the Xcode project exported by Unity. - -Dependencies for iOS are added by referring to CocoaPods. - - 1. Add the `external-dependency-manager-*.unitypackage` to your plugin - project (assuming you are developing a plugin). If you are redistributing - EDM4U with your plugin, you **must** follow the - import steps in the [Getting Started](#getting-started) section! - - 2. Copy and rename the - [SampleDependencies.xml](https://github.com/googlesamples/unity-jar-resolver/blob/master/sample/Assets/ExternalDependencyManager/Editor/SampleDependencies.xml) - file into your plugin and add the dependencies your plugin requires. - - The XML file just needs to be under an `Editor` directory and match the - name `*Dependencies.xml`. For example, - `MyPlugin/Editor/MyPluginDependencies.xml`. - - 3. Follow the steps in the [Getting Started](#getting-started) - section when you are exporting your plugin package. - -For example, to add the AdMob pod, version 7.0 or greater with bitcode enabled: - -``` - - - - - -``` - -## Integration Strategies - -The `CocoaPods` are either: - * Downloaded and injected into the Xcode project file directly, rather than - creating a separate xcworkspace. We call this `Xcode project` integration. - * If the Unity version supports opening a xcworkspace file, the `pod` tool - is used as intended to generate a xcworkspace which references the - CocoaPods. We call this `Xcode workspace` integration. - -The resolution strategy can be changed via the -`Assets > External Dependency Manager > iOS Resolver > Settings` menu. - -### Appending text to generated Podfile -In order to modify the generated Podfile you can create a script like this: -``` -using System.IO; -public class PostProcessIOS : MonoBehaviour { -[PostProcessBuildAttribute(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50) -private static void PostProcessBuild_iOS(BuildTarget target, string buildPath) -{ - if (target == BuildTarget.iOS) - { - - using (StreamWriter sw = File.AppendText(buildPath + "/Podfile")) - { - //in this example I'm adding an app extension - sw.WriteLine("\ntarget 'NSExtension' do\n pod 'Firebase/Messaging', '6.6.0'\nend"); - } - } -} -``` - -# Package Manager Resolver Usage - -Adding registries to the -[Package Manager](https://docs.unity3d.com/Manual/Packages.html) -(PM) is a manual process. The Package Manager Resolver (PMR) component -of this plugin makes it easy for plugin maintainers to distribute new PM -registry servers and easy for plugin users to manage PM registry servers. - -## Adding Registries - - 1. Add the `external-dependency-manager-*.unitypackage` to your plugin - project (assuming you are developing a plugin). If you are redistributing - EDM4U with your plugin, you **must** follow the - import steps in the [Getting Started](#getting-started) section! - - 2. Copy and rename the - [SampleRegistries.xml](https://github.com/googlesamples/unity-jar-resolver/blob/master/sample/Assets/ExternalDependencyManager/Editor/sample/Assets/ExternalDependencyManager/Editor/SampleRegistries.xml) - file into your plugin and add the registries your plugin requires. - - The XML file just needs to be under an `Editor` directory and match the - name `*Registries.xml` or labeled with `gumpr_registries`. For example, - `MyPlugin/Editor/MyPluginRegistries.xml`. - - 3. Follow the steps in the [Getting Started](#getting-started) - section when you are exporting your plugin package. - -For example, to add a registry for plugins in the scope `com.coolstuff`: - -``` - - - - com.coolstuff - - - -``` - -When PMR is loaded it will prompt the developer to add the registry to their -project if it isn't already present in the `Packages/manifest.json` file. - -For more information, see Unity's documentation on -[scoped package registries](https://docs.unity3d.com/Manual/upm-scoped.html). - -## Managing Registries - -It's possible to add and remove registries that are specified via PMR -XML configuration files via the following menu options: - -* `Assets > External Dependency Manager > Package Manager Resolver > - Add Registries` will prompt the user with a window which allows them to - add registries discovered in the project to the Package Manager. -* `Assets > External Dependency Manager > Package Manager Resolver > - Remove Registries` will prompt the user with a window which allows them to - remove registries discovered in the project from the Package Manager. -* `Assets > External Dependency Manager > Package Manager Resolver > - Modify Registries` will prompt the user with a window which allows them to - add or remove registries discovered in the project. - -## Migration - -PMR can migrate Version Handler packages installed in the `Assets` folder -to PM packages. This requires the plugins to implement the following: - -* `.unitypackage` must include a Version Handler manifests that describes - the components of the plugin. If the plugin has no dependencies - the manifest would just include the files in the plugin. -* The PM package JSON provided by the registry must include a keyword - (in the `versions.VERSION.keyword` list) that maps the PM package - to a Version Handler package using the format - `vh-name:VERSION_HANDLER_MANIFEST_NAME` where `VERSION_HANDLER_MANIFEST_NAME` - is the name of the manifest defined in the `.unitypackage`. For - more information see the description of the `gvhp_manifestname` asset label - in the *Version Handler Usage* section. - -When using the `Assets > External Dependency Manager > -Package Manager Resolver > Migrate Packages` menu option, PMR then -will: - -* List all Version Handler manager packages in the project. -* Search all available packages in the PM registries and fetch keywords - associated with each package parsing the Version Handler manifest names - for each package. -* Map each installed Version Handler package to a PM package. -* Prompt the user to migrate the discovered packages. -* Perform package migration for all selected packages if the user clicks - the `Apply` button. - -## Configuration - -PMR can be configured via the `Assets > External Dependency Manager > -Package Manager Resolver > Settings` menu option: - -* `Add package registries` when enabled, when the plugin loads or registry - configuration files change, this will prompt the user to add registries - that are not present in the Package Manager. -* `Prompt to add package registries` will cause a developer to be prompted - with a window that will ask for confirmation before adding registries. - When this is disabled registries are added silently to the project. -* `Prompt to migrate packages` will cause a developer to be prompted - with a window that will ask for confirmation before migrating packages - installed in the `Assets` directory to PM packages. -* `Enable Analytics Reporting` when enabled, reports the use of the plugin - to the developers so they can make imrpovements. -* `Verbose logging` when enabled prints debug information to the console - which can be useful when filing bug reports. - -# Version Handler Usage - -The Version Handler component of this plugin manages: - -* Shared Unity plugin dependencies. -* Upgrading Unity plugins by cleaning up old files from previous versions. -* Uninstallation of plugins that are distributed with manifest files. -* Restoration of plugin assets to their original install locations if assets - are tagged with the `exportpath` label. - -Since the Version Handler needs to modify Unity asset metadata (`.meta` files), -to enable / disable components, rename and delete asset files it does not -work with Package Manager installed packages. It's still possible to -include EDM4U in Package Manager packages, the Version Handler component -simply won't do anything to PM plugins in this case. - -## Using Version Handler Managed Plugins - -If a plugin is imported at multiple different versions into a project, if -the Version Handler is enabled, it will automatically check all managed -assets to determine the set of assets that are out of date and assets that -should be removed. To disable automatic checking managed assets disable -the `Enable version management` option in the -`Assets > External Dependency Manager > Version Handler > Settings` menu. - -If version management is disabled, it's possible to check managed assets -manually using the -`Assets > External Dependency Manager > Version Handler > Update` menu option. - -### Listing Managed Plugins - -Plugins managed by the Version Handler, those that ship with manifest files, -can displayed using the `Assets > External Dependency Manager > -Version Handler > Display Managed Packages` menu option. The list of plugins -are written to the console window along with the set of files used by each -plugin. - -### Uninstalling Managed Plugins - -Plugins managed by the Version Handler, those that ship with manifest files, -can be removed using the `Assets > External Dependency Manager > -Version Handler > Uninstall Managed Packages` menu option. This operation -will display a window that allows a developer to select a set of plugins to -remove which will remove all files owned by each plugin excluding those that -are in use by other installed plugins. - -Files managed by the Version Handler, those labeled with the `gvh` asset label, -can be checked to see whether anything needs to be upgraded, disabled or -removed using the `Assets > External Dependency Manager > -Version Handler > Update` menu option. - -### Restore Install Paths - -Some developers move assets around in their project which can make it -harder for plugin maintainers to debug issues if this breaks Unity's -[special folders](https://docs.unity3d.com/Manual/SpecialFolders.html) rules. -If assets are labeled with their original install / export path -(see `gvhp_exportpath` below), Version Handler can restore assets to their -original locations when using the `Assets > External Dependency Manager > -Version Handler > Move Files To Install Locations` menu option. - -### Settings - -Some behavior of the Version Handler can be configured via the -`Assets > External Dependency Manager > Version Handler > Settings` menu -option. - -* `Enable version management` controls whether the plugin should automatically - check asset versions and apply changes. If this is disabled the process - should be run manually when installing or upgrading managed plugins using - `Assets > External Dependency Manager > Version Handler > Update`. -* `Rename to canonical filenames` is a legacy option that will rename files to - remove version numbers and other labels from filenames. -* `Prompt for obsolete file deletion` enables the display of a window when - obsolete files are deleted allowing the developer to select which files to - delete and those to keep. -* `Allow disabling files via renaming` controls whether obsolete or disabled - files should be disabled by renaming them to `myfilename_DISABLED`. - Renaming to disable files is required in some scenarios where Unity doesn't - support removing files from the build via the PluginImporter. -* `Enable Analytics Reporting` enables / disables usage reporting to plugin - developers to improve the product. -* `Verbose logging` enables _very_ noisy log output that is useful for - debugging while filing a bug report or building a new managed plugin. -* `Use project settings` saves settings for the plugin in the project rather - than system-wide. - -## Redistributing a Managed Plugin - -The Version Handler employs a couple of methods for managing version -selection, upgrade and removal of plugins. - -* Each plugin can ship with a manifest file that lists the files it includes. - This makes it possible for Version Handler to calculate the difference - in assets between the most recent release of a plugin and the previous - release installed in a project. If a files are removed the Version Handler - will prompt the user to clean up obsolete files. -* Plugins can ship using assets with unique names, unique GUIDs and version - number labels. Version numbers can be attached to assets using labels or - added to the filename (e.g `myfile.txt` would be `myfile_version-x.y.z.txt). - This allows the Version Handler to determine which set of files are the - same file at different versions, select the most recent version and prompt - the developer to clean up old versions. - -Unity plugins can be managed by the Version Handler using the following steps: - - 1. Add the `gvh` asset label to each asset (file) you want Version Handler - to manage. - 1. Add the `gvh_version-VERSION` label to each asset where `VERSION` is the - version of the plugin you're releasing (e.g 1.2.3). - 1. Add the `gvhp_exportpath-PATH` label to each asset where `PATH` is the - export path of the file when the `.unitypackage` is created. This is - used to track files if they're moved around in a project by developers. - 1. Optional: Add `gvh_targets-editor` label to each editor DLL in your - plugin and disable `editor` as a target platform for the DLL. - The Version Handler will enable the most recent version of this DLL when - the plugin is imported. - 1. Optional: If your plugin is included in other Unity plugins, you should - add the version number to each filename and change the GUID of each asset. - This allows multiple versions of your plugin to be imported into a Unity - project, with the Version Handler component activating only the most - recent version. - 1. Create a manifest text file named `MY_UNIQUE_PLUGIN_NAME_VERSION.txt` - that lists all the files in your plugin relative to the project root. - Then add the `gvh_manifest` label to the asset to indicate this file is - a plugin manifest. - 1. Optional: Add a `gvhp_manifestname-NAME` label to your manifest file - to provide a human readable name for your package. If this isn't provided - the name of the manifest file will be used as the package name. - NAME can match the pattern `[0-9]+[a-zA-Z -]' where a leading integer - will set the priority of the name where `0` is the highest priority - and preferably used as the display name. The lowest value (i.e highest - priority name) will be used as the display name and all other specified - names will be aliases of the display name. Aliases can refer to previous - names of the package allowing renaming across published versions. - 1. Redistribute EDM4U Unity plugin with your plugin. - See the [Plugin Redistribution](#plugin-redistribution) for the details. - -If you follow these steps: - - * When users import a newer version of your plugin, files referenced by the - older version's manifest are cleaned up. - * The latest version of the plugin will be selected when users import - multiple packages that include your plugin, assuming the steps in - [Plugin Redistribution](#plugin-redistribution) are followed. - -# Building from Source - -To build this plugin from source you need the following tools installed: - * Unity (with iOS and Android modules installed) - -You can build the plugin by running the following from your shell -(Linux / OSX): - -``` -./gradlew build -``` - -or Windows: - -``` -./gradlew.bat build -``` - -# Releasing - -Each time a new build of this plugin is checked into the source tree you -need to do the following: - - * Bump the plugin version variable `pluginVersion` in `build.gradle` - * Update `CHANGELOG.md` with the new version number and changes included in - the release. - * Build the release using `./gradlew release` which performs the following: - * Updates `external-dependency-manager-*.unitypackage` - * Copies the unpacked plugin to the `exploded` directory. - * Updates template metadata files in the `plugin` directory. - The GUIDs of all asset metadata is modified due to the version number - change. Each file within the plugin is versioned to allow multiple - versions of the plugin to be imported into a Unity project which allows - the most recent version to be activated by the Version Handler - component. - * Create release commit using `./gradlew gitCreateReleaseCommit` which - performs `git commit -a -m "description from CHANGELOG.md"` - * Once the release commit is merge, tag the release using - `./gradlew gitTagRelease` which performs the following: - * `git tag -a pluginVersion -m "version RELEASE"` to tag the release. - * Update tags on remote branch using `git push --tag REMOTE HEAD:master` diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md.meta deleted file mode 100644 index dc57bb6..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/README.md.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 57b5c3f72b65480eba2cc96380835972 -labels: -- gvh -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/README.md -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt deleted file mode 100755 index 63e8150..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt +++ /dev/null @@ -1,13 +0,0 @@ -Assets/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll.mdb -Assets/ExternalDependencyManager/Editor/CHANGELOG.md -Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll -Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.mdb -Assets/ExternalDependencyManager/Editor/LICENSE -Assets/ExternalDependencyManager/Editor/README.md diff --git a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt.meta b/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt.meta deleted file mode 100644 index 55660ac..0000000 --- a/Assets/Samples/Dependencies/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: f0ebd68c0b4541ada7e16bfce4ef4155 -labels: -- gvh -- gvh_manifest -- gvh_version-1.2.169 -- gvhp_exportpath-ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt -- gvhp_manifestname-0External Dependency Manager -- gvhp_manifestname-play-services-resolver -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames.meta b/Assets/Samples/Dependencies/GooglePlayGames.meta deleted file mode 100644 index a5aab89..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3ad5542892e7045a292e79c8d825de22 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games.meta deleted file mode 100644 index c9f7b5f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 07c584f6dabcf1c52bdb6a9f07429cde -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor.meta deleted file mode 100644 index 00da255..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 11083f74e79584f50ad394be94e2caec -folderAsset: yes -timeCreated: 1435699548 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs deleted file mode 100644 index 8413846..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs +++ /dev/null @@ -1,460 +0,0 @@ -// -// Copyright (C) Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -namespace GooglePlayGames.Editor -{ - using System; - using System.Collections; - using System.IO; - using System.Xml; - using UnityEditor; - using UnityEngine; - - /// - /// Google Play Game Services Setup dialog for Android. - /// - public class GPGSAndroidSetupUI : EditorWindow - { - /// - /// The configuration data from the play games console "resource data" - /// - private string mConfigData = string.Empty; - - /// - /// The name of the class to generate containing the resource constants. - /// - private string mClassName = "GPGSIds"; - - /// - /// The scroll position - /// - private Vector2 scroll; - - /// - /// The directory for the constants class. - /// - private string mConstantDirectory = "Assets"; - - /// - /// The web client identifier. - /// - private string mWebClientId = string.Empty; - - /// - /// Menus the item for GPGS android setup. - /// - [MenuItem("Window/Google Play Games/Setup/Android setup...", false, 1)] - public static void MenuItemFileGPGSAndroidSetup() - { - EditorWindow window = EditorWindow.GetWindow( - typeof(GPGSAndroidSetupUI), true, GPGSStrings.AndroidSetup.Title); - window.minSize = new Vector2(500, 400); - } - - [MenuItem("Window/Google Play Games/Setup/Android setup...", true)] - public static bool EnableAndroidMenuItem() - { -#if UNITY_ANDROID - return true; -#else - return false; -#endif - } - - /// - /// Performs setup using the Android resources downloaded XML file - /// from the play console. - /// - /// true, if setup was performed, false otherwise. - /// The web client id. - /// the directory to write the constants file to. - /// Fully qualified class name for the resource Ids. - /// Resource xml data. - /// Nearby svc identifier. - /// Indicates this app requires G+ - public static bool PerformSetup( - string clientId, - string classDirectory, - string className, - string resourceXmlData, - string nearbySvcId) - { - if (string.IsNullOrEmpty(resourceXmlData) && - !string.IsNullOrEmpty(nearbySvcId)) - { - return PerformSetup( - clientId, - GPGSProjectSettings.Instance.Get(GPGSUtil.APPIDKEY), - nearbySvcId); - } - - if (ParseResources(classDirectory, className, resourceXmlData)) - { - GPGSProjectSettings.Instance.Set(GPGSUtil.CLASSDIRECTORYKEY, classDirectory); - GPGSProjectSettings.Instance.Set(GPGSUtil.CLASSNAMEKEY, className); - GPGSProjectSettings.Instance.Set(GPGSUtil.ANDROIDRESOURCEKEY, resourceXmlData); - - // check the bundle id and set it if needed. - CheckBundleId(); - - GPGSUtil.CheckAndFixDependencies(); - GPGSUtil.CheckAndFixVersionedAssestsPaths(); - AssetDatabase.Refresh(); - - Google.VersionHandler.VerboseLoggingEnabled = true; - Google.VersionHandler.UpdateVersionedAssets(forceUpdate: true); - Google.VersionHandler.Enabled = true; - AssetDatabase.Refresh(); - - Google.VersionHandler.InvokeStaticMethod( - Google.VersionHandler.FindClass( - "Google.JarResolver", - "GooglePlayServices.PlayServicesResolver"), - "MenuResolve", null); - - return PerformSetup( - clientId, - GPGSProjectSettings.Instance.Get(GPGSUtil.APPIDKEY), - nearbySvcId); - } - - return false; - } - - /// - /// Provide static access to setup for facilitating automated builds. - /// - /// The oauth2 client id for the game. This is only - /// needed if the ID Token or access token are needed. - /// App identifier. - /// Optional nearby connection serviceId - /// Indicates that GooglePlus should be enabled - /// true if successful - public static bool PerformSetup(string webClientId, string appId, string nearbySvcId) - { - if (!string.IsNullOrEmpty(webClientId)) - { - if (!GPGSUtil.LooksLikeValidClientId(webClientId)) - { - GPGSUtil.Alert(GPGSStrings.Setup.ClientIdError); - return false; - } - - string serverAppId = webClientId.Split('-')[0]; - if (!serverAppId.Equals(appId)) - { - GPGSUtil.Alert(GPGSStrings.Setup.AppIdMismatch); - return false; - } - } - - // check for valid app id - if (!GPGSUtil.LooksLikeValidAppId(appId) && string.IsNullOrEmpty(nearbySvcId)) - { - GPGSUtil.Alert(GPGSStrings.Setup.AppIdError); - return false; - } - - if (nearbySvcId != null) - { -#if UNITY_ANDROID - if (!NearbyConnectionUI.PerformSetup(nearbySvcId, true)) - { - return false; - } -#endif - } - - GPGSProjectSettings.Instance.Set(GPGSUtil.APPIDKEY, appId); - GPGSProjectSettings.Instance.Set(GPGSUtil.WEBCLIENTIDKEY, webClientId); - GPGSProjectSettings.Instance.Save(); - GPGSUtil.UpdateGameInfo(); - - // check that Android SDK is there - if (!GPGSUtil.HasAndroidSdk()) - { - Debug.LogError("Android SDK not found."); - EditorUtility.DisplayDialog( - GPGSStrings.AndroidSetup.SdkNotFound, - GPGSStrings.AndroidSetup.SdkNotFoundBlurb, - GPGSStrings.Ok); - return false; - } - - // Generate AndroidManifest.xml - GPGSUtil.GenerateAndroidManifest(); - - // refresh assets, and we're done - AssetDatabase.Refresh(); - GPGSProjectSettings.Instance.Set(GPGSUtil.ANDROIDSETUPDONEKEY, true); - GPGSProjectSettings.Instance.Save(); - - return true; - } - - /// - /// Called when this object is enabled by Unity editor. - /// - public void OnEnable() - { - GPGSProjectSettings settings = GPGSProjectSettings.Instance; - mConstantDirectory = settings.Get(GPGSUtil.CLASSDIRECTORYKEY, mConstantDirectory); - mClassName = settings.Get(GPGSUtil.CLASSNAMEKEY, mClassName); - mConfigData = settings.Get(GPGSUtil.ANDROIDRESOURCEKEY); - mWebClientId = settings.Get(GPGSUtil.WEBCLIENTIDKEY); - } - - /// - /// Called when the GUI should be rendered. - /// - public void OnGUI() - { - GUI.skin.label.wordWrap = true; - GUILayout.BeginVertical(); - - GUIStyle link = new GUIStyle(GUI.skin.label); - link.normal.textColor = new Color(0f, 0f, 1f); - - GUILayout.Space(10); - GUILayout.Label(GPGSStrings.AndroidSetup.Blurb); - if (GUILayout.Button("Open Play Games Console", link, GUILayout.ExpandWidth(false))) - { - Application.OpenURL("https://play.google.com/apps/publish"); - } - - Rect last = GUILayoutUtility.GetLastRect(); - last.y += last.height - 2; - last.x += 3; - last.width -= 6; - last.height = 2; - - GUI.Box(last, string.Empty); - - GUILayout.Space(15); - GUILayout.Label("Constants class name", EditorStyles.boldLabel); - GUILayout.Label("Enter the fully qualified name of the class to create containing the constants"); - GUILayout.Space(10); - - mConstantDirectory = EditorGUILayout.TextField( - "Directory to save constants", - mConstantDirectory, - GUILayout.MinWidth(480)); - - mClassName = EditorGUILayout.TextField( - "Constants class name", - mClassName, - GUILayout.MinWidth(480)); - - GUILayout.Label("Resources Definition", EditorStyles.boldLabel); - GUILayout.Label("Paste in the Android Resources from the Play Console"); - GUILayout.Space(10); - - scroll = GUILayout.BeginScrollView(scroll); - mConfigData = EditorGUILayout.TextArea( - mConfigData, - GUILayout.MinWidth(475), - GUILayout.Height(Screen.height)); - GUILayout.EndScrollView(); - GUILayout.Space(10); - - // Client ID field - GUILayout.Label(GPGSStrings.Setup.WebClientIdTitle, EditorStyles.boldLabel); - GUILayout.Label(GPGSStrings.AndroidSetup.WebClientIdBlurb); - - mWebClientId = EditorGUILayout.TextField( - GPGSStrings.Setup.ClientId, - mWebClientId, - GUILayout.MinWidth(450)); - - GUILayout.Space(10); - - GUILayout.FlexibleSpace(); - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (GUILayout.Button(GPGSStrings.Setup.SetupButton, GUILayout.Width(100))) - { - // check that the classname entered is valid - try - { - if (GPGSUtil.LooksLikeValidPackageName(mClassName)) - { - DoSetup(); - return; - } - } - catch (Exception e) - { - GPGSUtil.Alert( - GPGSStrings.Error, - "Invalid classname: " + e.Message); - } - } - - if (GUILayout.Button("Cancel", GUILayout.Width(100))) - { - Close(); - } - - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - GUILayout.Space(20); - GUILayout.EndVertical(); - } - - /// - /// Starts the setup process. - /// - public void DoSetup() - { - if (PerformSetup(mWebClientId, mConstantDirectory, mClassName, mConfigData, null)) - { - CheckBundleId(); - - EditorUtility.DisplayDialog( - GPGSStrings.Success, - GPGSStrings.AndroidSetup.SetupComplete, - GPGSStrings.Ok); - - GPGSProjectSettings.Instance.Set(GPGSUtil.ANDROIDSETUPDONEKEY, true); - Close(); - } - else - { - GPGSUtil.Alert( - GPGSStrings.Error, - "Invalid or missing XML resource data. Make sure the data is" + - " valid and contains the app_id element"); - } - } - - /// - /// Checks the bundle identifier. - /// - /// - /// Check the package id. If one is set the gpgs properties, - /// and the player settings are the default or empty, set it. - /// if the player settings is not the default, then prompt before - /// overwriting. - /// - public static void CheckBundleId() - { - string packageName = GPGSProjectSettings.Instance.Get( - GPGSUtil.ANDROIDBUNDLEIDKEY, string.Empty); - string currentId; -#if UNITY_5_6_OR_NEWER - currentId = PlayerSettings.GetApplicationIdentifier( - BuildTargetGroup.Android); -#else - currentId = PlayerSettings.bundleIdentifier; -#endif - if (!string.IsNullOrEmpty(packageName)) - { - if (string.IsNullOrEmpty(currentId) || - currentId == "com.Company.ProductName") - { -#if UNITY_5_6_OR_NEWER - PlayerSettings.SetApplicationIdentifier( - BuildTargetGroup.Android, packageName); -#else - PlayerSettings.bundleIdentifier = packageName; -#endif - } - else if (currentId != packageName) - { - if (EditorUtility.DisplayDialog( - "Set Bundle Identifier?", - "The server configuration is using " + - packageName + ", but the player settings is set to " + - currentId + ".\nSet the Bundle Identifier to " + - packageName + "?", - "OK", - "Cancel")) - { -#if UNITY_5_6_OR_NEWER - PlayerSettings.SetApplicationIdentifier( - BuildTargetGroup.Android, packageName); -#else - PlayerSettings.bundleIdentifier = packageName; -#endif - } - } - } - else - { - Debug.Log("NULL package!!"); - } - } - - /// - /// Parses the resources xml and set the properties. Also generates the - /// constants file. - /// - /// true, if resources was parsed, false otherwise. - /// Class directory. - /// Class name. - /// Res. the data to parse. - private static bool ParseResources(string classDirectory, string className, string res) - { - XmlTextReader reader = new XmlTextReader(new StringReader(res)); - bool inResource = false; - string lastProp = null; - Hashtable resourceKeys = new Hashtable(); - string appId = null; - while (reader.Read()) - { - if (reader.Name == "resources") - { - inResource = true; - } - - if (inResource && reader.Name == "string") - { - lastProp = reader.GetAttribute("name"); - } - else if (inResource && !string.IsNullOrEmpty(lastProp)) - { - if (reader.HasValue) - { - if (lastProp == "app_id") - { - appId = reader.Value; - GPGSProjectSettings.Instance.Set(GPGSUtil.APPIDKEY, appId); - } - else if (lastProp == "package_name") - { - GPGSProjectSettings.Instance.Set(GPGSUtil.ANDROIDBUNDLEIDKEY, reader.Value); - } - else - { - resourceKeys[lastProp] = reader.Value; - } - - lastProp = null; - } - } - } - - reader.Close(); - if (resourceKeys.Count > 0) - { - GPGSUtil.WriteResourceIds(classDirectory, className, resourceKeys); - } - - return appId != null; - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs.meta deleted file mode 100644 index 9ee31be..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 41fe658b93aa24c709c540575965fdff -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs deleted file mode 100644 index 4d7c39d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.Editor -{ - using UnityEngine; - using UnityEditor; - - public class GPGSDocsUI - { - [MenuItem("Window/Google Play Games/Documentation/Plugin Getting Started Guide...", false, 100)] - public static void MenuItemGettingStartedGuide() - { - Application.OpenURL(GPGSStrings.ExternalLinks.GettingStartedGuideURL); - } - - [MenuItem("Window/Google Play Games/Documentation/Google Play Games API...", false, 101)] - public static void MenuItemPlayGamesServicesAPI() - { - Application.OpenURL(GPGSStrings.ExternalLinks.PlayGamesServicesApiURL); - } - - [MenuItem("Window/Google Play Games/About/About the Plugin...", false, 300)] - public static void MenuItemAbout() - { - string msg = GPGSStrings.AboutText + - PluginVersion.VersionString + " (" + - string.Format("0x{0:X8}", GooglePlayGames.PluginVersion.VersionInt) + ")"; - EditorUtility.DisplayDialog(GPGSStrings.AboutTitle, msg, - GPGSStrings.Ok); - } - - [MenuItem("Window/Google Play Games/About/License...", false, 301)] - public static void MenuItemLicense() - { - EditorUtility.DisplayDialog(GPGSStrings.LicenseTitle, GPGSStrings.LicenseText, - GPGSStrings.Ok); - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs.meta deleted file mode 100644 index befa646..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 73cbcab28a27446ff9e06e06a040814f -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs deleted file mode 100644 index fb55c43..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID -namespace GooglePlayGames.Editor -{ - using System.Collections.Generic; - using System.IO; - using UnityEditor.Callbacks; - using UnityEditor; - using UnityEngine; - - public static class GPGSPostBuild - { - [PostProcessBuild(99999)] - public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) - { - if (!GPGSProjectSettings.Instance.GetBool(GPGSUtil.ANDROIDSETUPDONEKEY, false)) - { - EditorUtility.DisplayDialog("Google Play Games not configured!", - "Warning!! Google Play Games was not configured, Game Services will not work correctly.", - "OK"); - } - - return; - } - } -} -#endif //UNITY_ANDROID \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs.meta deleted file mode 100644 index 9be83cb..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 1a7b050a8e8214613893df7d81dcc13c -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs deleted file mode 100644 index ea6ae5d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs +++ /dev/null @@ -1,197 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Keep this file even on unsupported configurations. - -namespace GooglePlayGames.Editor -{ - using System.Collections.Generic; - using System.IO; -#if UNITY_2017_3_OR_NEWER - using UnityEngine.Networking; -#else - using UnityEngine; - -#endif - - public class GPGSProjectSettings - { - private static GPGSProjectSettings sInstance = null; - - public static GPGSProjectSettings Instance - { - get - { - if (sInstance == null) - { - sInstance = new GPGSProjectSettings(); - } - - return sInstance; - } - } - - private bool mDirty = false; - private readonly string mFile; - private Dictionary mDict = new Dictionary(); - - private GPGSProjectSettings() - { - mFile = GPGSUtil.SlashesToPlatformSeparator("ProjectSettings/GooglePlayGameSettings.txt"); - - StreamReader rd = null; - - // read the settings file, this list is all the locations it can be in order of precedence. - string[] fileLocations = - { - mFile, - GPGSUtil.SlashesToPlatformSeparator(Path.Combine(GPGSUtil.RootPath, "Editor/projsettings.txt")), - GPGSUtil.SlashesToPlatformSeparator("Assets/Editor/projsettings.txt") - }; - - foreach (string f in fileLocations) - { - if (File.Exists(f)) - { - // assign the reader and break out of the loop - rd = new StreamReader(f); - break; - } - } - - if (rd != null) - { - while (!rd.EndOfStream) - { - string line = rd.ReadLine(); - if (line == null || line.Trim().Length == 0) - { - break; - } - - line = line.Trim(); - string[] p = line.Split(new char[] {'='}, 2); - if (p.Length >= 2) - { - mDict[p[0].Trim()] = p[1].Trim(); - } - } - - rd.Close(); - } - } - - public string Get(string key, Dictionary overrides) - { - if (overrides.ContainsKey(key)) - { - return overrides[key]; - } - else if (mDict.ContainsKey(key)) - { -#if UNITY_2017_3_OR_NEWER - return UnityWebRequest.UnEscapeURL(mDict[key]); -#else - return WWW.UnEscapeURL(mDict[key]); -#endif - } - else - { - return string.Empty; - } - } - - public string Get(string key, string defaultValue) - { - if (mDict.ContainsKey(key)) - { -#if UNITY_2017_3_OR_NEWER - return UnityWebRequest.UnEscapeURL(mDict[key]); -#else - return WWW.UnEscapeURL(mDict[key]); -#endif - } - else - { - return defaultValue; - } - } - - public string Get(string key) - { - return Get(key, string.Empty); - } - - public bool GetBool(string key, bool defaultValue) - { - return Get(key, defaultValue ? "true" : "false").Equals("true"); - } - - public bool GetBool(string key) - { - return Get(key, "false").Equals("true"); - } - - public void Set(string key, string val) - { -#if UNITY_2017_3_OR_NEWER - string escaped = UnityWebRequest.EscapeURL(val); -#else - string escaped = WWW.EscapeURL(val); -#endif - mDict[key] = escaped; - mDirty = true; - } - - public void Set(string key, bool val) - { - Set(key, val ? "true" : "false"); - } - - public void Save() - { - // See if we are building the plugin, and don't write the settings file - string[] args = System.Environment.GetCommandLineArgs(); - foreach (string a in args) - { - if (a == "-g.building") - { - mDirty = false; - break; - } - } - - if (!mDirty) - { - return; - } - - StreamWriter wr = new StreamWriter(mFile, false); - foreach (string key in mDict.Keys) - { - wr.WriteLine(key + "=" + mDict[key]); - } - - wr.Close(); - mDirty = false; - } - - public static void Reload() - { - sInstance = new GPGSProjectSettings(); - } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs.meta deleted file mode 100644 index 3856a57..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: cf234a050ba25433f9386e20578ccf19 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs deleted file mode 100644 index 268e882..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs +++ /dev/null @@ -1,174 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Keep the strings all the time even if on an unsupported configuration. - -namespace GooglePlayGames.Editor -{ - public class GPGSStrings - { - public const string Error = "Error"; - public const string Ok = "OK"; - public const string Cancel = "Cancel"; - public const string Yes = "Yes"; - public const string No = "No"; - public const string Success = "Success"; - public const string Warning = "Warning"; - - public class PostInstall - { - public const string Title = "Google Play Games Plugin for Unity"; - - public const string Text = "The Google Play Games Plugin for Unity version $VERSION " + - "is now ready to use. If this is a new installation or if you have " + - "just upgraded from a previous version, please click the 'Google Play Games' " + - "menu and select 'Android Setup' to set up your project."; - } - - public class Setup - { - public const string AppIdTitle = "Google Play Games Application ID"; - public const string AppId = "Application ID"; - - public const string AppIdBlurb = "Enter your application ID below. This is the numeric\n" + - "identifier provided by the Developer Console (for example, 123456789012)."; - - public const string AppIdError = "The App Id does not appear to be valid. " + - "It must consist solely of digits, usually 10 or more."; - - public const string WebClientIdTitle = "Web App Client ID (Optional)"; - public const string ClientId = "Client ID"; - - public const string ClientIdError = "The Client ID does not appear to be valid. " + - "It should end in .apps.googleusercontent.com."; - - public const string AppIdMismatch = "Web app client ID not associated with this game!"; - - public const string NearbyServiceId = "Nearby Connection Service ID"; - - public const string NearbyServiceBlurb = "Enter the service id that identifies the " + - "nearby connections service scope"; - - public const string SetupButton = "Setup"; - } - - public class NearbyConnections - { - public const string Title = "Google Play Games - Nearby Connections Setup"; - - public const string Blurb = "To configure Nearby Connections in this project,\n" + - "please enter the information below and click on the Setup button."; - - public const string SetupComplete = "Nearby connections configured successfully."; - } - - public class AndroidSetup - { - public const string Title = "Google Play Games - Android Configuration"; - - public const string Blurb = "To configure Google Play Games in this project,\n" + - "go to the Play Game console, then enter the information below and click on the Setup button."; - - public const string WebClientIdBlurb = - "The web app client ID is needed to access the user's ID token and " + - "call other APIs onbehalf of the user." + - " It is not required for Game Services. Enter your oauth2 client ID below.\nTo obtain this " + - "ID, generate a web linked app in Developer Console. Example:\n" + - "123456789012-abcdefghijklm.apps.googleusercontent.com"; - - public const string PkgName = "Package name"; - - public const string PkgNameBlurb = "Enter your application's package name below.\n" + - "(for example, com.example.lorem.ipsum)."; - - public const string PackageNameError = "The package name does not appear to be valid. " + - "Enter a valid Android package name (for example, com.example.lorem.ipsum)."; - - public const string SdkNotFound = "Android SDK Not found"; - - public const string SdkNotFoundBlurb = "The Android SDK path was not found. " + - "Please configure it in the Unity preferences window (under External Tools)."; - - public const string LibProjNotFound = "Google Play Services Library Project Not Found"; - - public const string LibProjNotFoundBlurb = "Google Play Services library project " + - "could not be found your SDK installation. Make sure it is installed (open " + - "the SDK manager and go to Extras, and select Google Play Services)."; - - public const string SupportJarNotFound = "Android Support Library v4 Not Found"; - - public const string SupportJarNotFoundBlurb = "Android Support Library v4 " + - "could not be found your SDK installation. Make sure it is installed (open " + - "the SDK manager and go to Extras, and select 'Android Support Library')."; - - public const string LibProjVerNotFound = "The version of your copy of the Google Play " + - "Services Library Project could not be determined. Please make sure it is " + - "at least version {0}. Continue?"; - - public const string LibProjVerTooOld = "Your copy of the Google Play " + - "Services Library Project is out of date. Please launch the Android SDK manager " + - "and upgrade your Google Play Services bundle to the latest version (your version: " + - "{0}; required version: {1}). Proceeding may cause problems. Proceed anyway?"; - - public const string SetupComplete = "Google Play Games configured successfully."; - } - - public class ExternalLinks - { - public const string GettingStartedGuideURL = - "https://github.com/playgameservices/play-games-plugin-for-unity"; - - public const string PlayGamesServicesApiURL = - "https://developers.google.com/games/services"; - - public const string GooglePlayGamesAndroidSdkTitle = "Google Play Games Android SDK Download"; - - public const string GooglePlayGamesAndroidSdkBlurb = "The Google Play Games SDK for " + - "Android must be downloaded via the Android SDK Manager. Do you wish to " + - "start the SDK manager now?"; - - public const string GooglePlayGamesAndroidSdkInstructions = "The Android SDK manager " + - "will be launched. Install or upgrade the 'Google Play Services' package, " + - "which can be found under the 'Extras' " + - "category."; - - public const string GooglePlayGamesAndroidSdkManagerFailed = "Failed to find the " + - "Android SDK manager executable. Make sure the Android SDK is properly installed " + - "and that its path is correctly configured in the Unity preferences window " + - "(under External Tools)."; - } - - public const string AboutTitle = "Google Play Games Plugin for Unity"; - - public const string AboutText = "Copyright (C) 2014 Google Inc.\n\nThis is an open-source " + - "plugin that allows cross-platform integration with Google Play games services. " + - "For more information, visit the official site on Github:\n\n" + - "https://github.com/playgameservices/play-games-plugin-for-unity\n\nPlugin version: "; - - public const string LicenseTitle = "Google Play Games Plugin for Unity"; - - public const string LicenseText = "Copyright (C) 2014 Google Inc. All Rights Reserved.\n\n" + - "Licensed under the Apache License, Version 2.0 (the \"License\"); " + - "you may not use this file except in compliance with the License. " + - "You may obtain a copy of the License at\n\n" + - " http://www.apache.org/licenses/LICENSE-2.0\n\n" + - "Unless required by applicable law or agreed to in writing, software " + - "distributed under the License is distributed on an \"AS IS\" BASIS, " + - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. " + - "See the License for the specific language governing permissions and " + - "limitations under the License."; - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs.meta deleted file mode 100644 index bf933fd..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 992ecb564cf02408d9c5a1b44d958334 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs deleted file mode 100644 index ada7ed1..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.Editor -{ - using System.IO; - using UnityEditor; - using UnityEngine; - - /// - /// GPGS upgrader handles performing and upgrade tasks. - /// - [InitializeOnLoad] - public class GPGSUpgrader - { - /// - /// Initializes static members of the class. - /// - static GPGSUpgrader() - { - if (EditorApplication.isPlayingOrWillChangePlaymode) - return; - Debug.Log("GPGSUpgrader start"); - - GPGSProjectSettings.Instance.Set(GPGSUtil.LASTUPGRADEKEY, PluginVersion.VersionKey); - GPGSProjectSettings.Instance.Set(GPGSUtil.PLUGINVERSIONKEY, - PluginVersion.VersionString); - GPGSProjectSettings.Instance.Save(); - - bool isChanged = false; - // Check that there is a AndroidManifest.xml file - if (!GPGSUtil.AndroidManifestExists()) - { - isChanged = true; - GPGSUtil.GenerateAndroidManifest(); - } - - if (isChanged) - { - AssetDatabase.Refresh(); - } - Debug.Log("GPGSUpgrader done"); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs.meta deleted file mode 100644 index 8ef2612..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 357a64420a0c44b61a0ed7ca22c7f10f -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs deleted file mode 100644 index 4eadb15..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs +++ /dev/null @@ -1,798 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Keep this even on unsupported configurations. - -namespace GooglePlayGames.Editor -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.IO; - using System.Xml; - using UnityEditor; - using UnityEngine; - - /// - /// Utility class to perform various tasks in the editor. - /// - public static class GPGSUtil - { - /// Property key for project settings. - public const string SERVICEIDKEY = "App.NearbdServiceId"; - - /// Property key for project settings. - public const string APPIDKEY = "proj.AppId"; - - /// Property key for project settings. - public const string CLASSDIRECTORYKEY = "proj.classDir"; - - /// Property key for project settings. - public const string CLASSNAMEKEY = "proj.ConstantsClassName"; - - /// Property key for project settings. - public const string WEBCLIENTIDKEY = "and.ClientId"; - - /// Property key for project settings. - public const string ANDROIDRESOURCEKEY = "and.ResourceData"; - - /// Property key for project settings. - public const string ANDROIDSETUPDONEKEY = "android.SetupDone"; - - /// Property key for project settings. - public const string ANDROIDBUNDLEIDKEY = "and.BundleId"; - - /// Property key for plugin version. - public const string PLUGINVERSIONKEY = "proj.pluginVersion"; - - /// Property key for nearby settings done. - public const string NEARBYSETUPDONEKEY = "android.NearbySetupDone"; - - /// Property key for project settings. - public const string LASTUPGRADEKEY = "lastUpgrade"; - - /// Constant for token replacement - private const string SERVICEIDPLACEHOLDER = "__NEARBY_SERVICE_ID__"; - - private const string SERVICEID_ELEMENT_PLACEHOLDER = "__NEARBY_SERVICE_ELEMENT__"; - - private const string NEARBY_PERMISSIONS_PLACEHOLDER = "__NEARBY_PERMISSIONS__"; - - /// Constant for token replacement - private const string APPIDPLACEHOLDER = "__APP_ID__"; - - /// Constant for token replacement - private const string CLASSNAMEPLACEHOLDER = "__Class__"; - - /// Constant for token replacement - private const string WEBCLIENTIDPLACEHOLDER = "__WEB_CLIENTID__"; - - /// Constant for token replacement - private const string PLUGINVERSIONPLACEHOLDER = "__PLUGIN_VERSION__"; - - /// Constant for require google plus token replacement - private const string REQUIREGOOGLEPLUSPLACEHOLDER = "__REQUIRE_GOOGLE_PLUS__"; - - /// Property key for project settings. - private const string TOKENPERMISSIONKEY = "proj.tokenPermissions"; - - /// Constant for token replacement - private const string NAMESPACESTARTPLACEHOLDER = "__NameSpaceStart__"; - - /// Constant for token replacement - private const string NAMESPACEENDPLACEHOLDER = "__NameSpaceEnd__"; - - /// Constant for token replacement - private const string CONSTANTSPLACEHOLDER = "__Constant_Properties__"; - - /// - /// The game info file path, relative to the plugin root directory. This is a generated file. - /// - private const string GameInfoRelativePath = "Runtime/Scripts/GameInfo.cs"; - - /// - /// The manifest path, relative to the plugin root directory. - /// - /// The Games SDK requires additional metadata in the AndroidManifest.xml - /// file. - private const string ManifestRelativePath = - "../../Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml"; - - private const string RootFolderName = "com.google.play.games"; - - /// - /// The root path of the Google Play Games plugin - /// - public static string RootPath - { - get - { - if (string.IsNullOrEmpty(mRootPath)) - { -#if UNITY_2018_4_OR_NEWER - // Search for root path in plugin locations for both Asset packages and UPM packages - string[] dirs = Directory.GetDirectories("Packages", RootFolderName, SearchOption.AllDirectories); - string[] dir1 = Directory.GetDirectories("Assets", RootFolderName, SearchOption.AllDirectories); - int dirsLength = dirs.Length; - Array.Resize(ref dirs, dirsLength + dir1.Length); - Array.Copy(dir1, 0, dirs, dirsLength, dir1.Length); -#else - string[] dirs = Directory.GetDirectories("Assets", RootFolderName, SearchOption.AllDirectories); -#endif - switch (dirs.Length) - { - case 0: - Alert("Plugin error: com.google.play.games folder was renamed"); - throw new Exception("com.google.play.games folder was renamed"); - - case 1: - mRootPath = SlashesToPlatformSeparator(dirs[0]); - break; - - default: - for (int i = 0; i < dirs.Length; i++) - { - if (File.Exists(SlashesToPlatformSeparator(Path.Combine(dirs[i], GameInfoRelativePath))) - ) - { - mRootPath = SlashesToPlatformSeparator(dirs[i]); - break; - } - } - - if (string.IsNullOrEmpty(mRootPath)) - { - Alert("Plugin error: com.google.play.games folder was renamed"); - throw new Exception("com.google.play.games folder was renamed"); - } - - break; - } - } - // UPM package root path is 'Library/PackageCache/com.google.play.games@.*/ - // where the suffix can be a version number if installed with URS - // or a hash if from disk or tarball - if (mRootPath.Contains(RootFolderName + '@')) - { - mRootPath = mRootPath.Replace("Packages", "Library/PackageCache"); - } - return mRootPath; - } - } - - /// - /// The game info file path. This is a generated file. - /// - private static string GameInfoPath - { - get { return SlashesToPlatformSeparator(Path.Combine(RootPath, GameInfoRelativePath)); } - } - - /// - /// The manifest path. - /// - /// The Games SDK requires additional metadata in the AndroidManifest.xml - /// file. - private static string ManifestPath - { - get { return SlashesToPlatformSeparator(Path.Combine(RootPath, ManifestRelativePath)); } - } - - /// - /// The root path of the Google Play Games plugin - /// - private static string mRootPath = ""; - - /// - /// The map of replacements for filling in code templates. The - /// key is the string that appears in the template as a placeholder, - /// the value is the key into the GPGSProjectSettings. - /// - private static Dictionary replacements = - new Dictionary() - { - // Put this element placeholder first, since it has embedded placeholder - {SERVICEID_ELEMENT_PLACEHOLDER, SERVICEID_ELEMENT_PLACEHOLDER}, - {SERVICEIDPLACEHOLDER, SERVICEIDKEY}, - {APPIDPLACEHOLDER, APPIDKEY}, - {CLASSNAMEPLACEHOLDER, CLASSNAMEKEY}, - {WEBCLIENTIDPLACEHOLDER, WEBCLIENTIDKEY}, - {PLUGINVERSIONPLACEHOLDER, PLUGINVERSIONKEY}, - // Causes the placeholder to be replaced with overridden value at runtime. - {NEARBY_PERMISSIONS_PLACEHOLDER, NEARBY_PERMISSIONS_PLACEHOLDER} - }; - - /// - /// Replaces / in file path to be the os specific separator. - /// - /// The path. - /// Path with correct separators. - public static string SlashesToPlatformSeparator(string path) - { - return path.Replace("/", System.IO.Path.DirectorySeparatorChar.ToString()); - } - - /// - /// Reads the file. - /// - /// The file contents. The slashes are corrected. - /// File path. - public static string ReadFile(string filePath) - { - filePath = SlashesToPlatformSeparator(filePath); - if (!File.Exists(filePath)) - { - Alert("Plugin error: file not found: " + filePath); - return null; - } - - StreamReader sr = new StreamReader(filePath); - string body = sr.ReadToEnd(); - sr.Close(); - return body; - } - - /// - /// Reads the editor template. - /// - /// The editor template contents. - /// Name of the template in the editor directory. - public static string ReadEditorTemplate(string name) - { - return ReadFile( - Path.Combine(RootPath, string.Format("Editor{0}{1}.txt", Path.DirectorySeparatorChar, name))); - } - - /// - /// Writes the file. - /// - /// File path - the slashes will be corrected. - /// Body of the file to write. - public static void WriteFile(string file, string body) - { - file = SlashesToPlatformSeparator(file); - DirectoryInfo dir = Directory.GetParent(file); - dir.Create(); - using (var wr = new StreamWriter(file, false)) - { - wr.Write(body); - } - } - - /// - /// Validates the string to be a valid nearby service id. - /// - /// true, if like valid service identifier was looksed, false otherwise. - /// string to test. - public static bool LooksLikeValidServiceId(string s) - { - if (s.Length < 3) - { - return false; - } - - foreach (char c in s) - { - if (!char.IsLetterOrDigit(c) && c != '.') - { - return false; - } - } - - return true; - } - - /// - /// Looks the like valid app identifier. - /// - /// true, if valid app identifier, false otherwise. - /// the string to test. - public static bool LooksLikeValidAppId(string s) - { - if (s.Length < 5) - { - return false; - } - - foreach (char c in s) - { - if (c < '0' || c > '9') - { - return false; - } - } - - return true; - } - - /// - /// Looks the like valid client identifier. - /// - /// true, if valid client identifier, false otherwise. - /// the string to test. - public static bool LooksLikeValidClientId(string s) - { - return s.EndsWith(".googleusercontent.com"); - } - - /// - /// Looks the like a valid bundle identifier. - /// - /// true, if valid bundle identifier, false otherwise. - /// the string to test. - public static bool LooksLikeValidBundleId(string s) - { - return s.Length > 3; - } - - /// - /// Looks like a valid package. - /// - /// true, if valid package name, false otherwise. - /// the string to test. - public static bool LooksLikeValidPackageName(string s) - { - if (string.IsNullOrEmpty(s)) - { - throw new Exception("cannot be empty"); - } - - string[] parts = s.Split(new char[] {'.'}); - foreach (string p in parts) - { - char[] bytes = p.ToCharArray(); - for (int i = 0; i < bytes.Length; i++) - { - if (i == 0 && !char.IsLetter(bytes[i])) - { - throw new Exception("each part must start with a letter"); - } - else if (char.IsWhiteSpace(bytes[i])) - { - throw new Exception("cannot contain spaces"); - } - else if (!char.IsLetterOrDigit(bytes[i]) && bytes[i] != '_') - { - throw new Exception("must be alphanumeric or _"); - } - } - } - - return parts.Length >= 1; - } - - /// - /// Determines if is setup done. - /// - /// true if is setup done; otherwise, false. - public static bool IsSetupDone() - { - bool doneSetup = true; -#if UNITY_ANDROID - doneSetup = GPGSProjectSettings.Instance.GetBool(ANDROIDSETUPDONEKEY, false); - // check gameinfo - if (File.Exists(GameInfoPath)) - { - string contents = ReadFile(GameInfoPath); - if (contents.Contains(APPIDPLACEHOLDER)) - { - Debug.Log("GameInfo not initialized with AppId. " + - "Run Window > Google Play Games > Setup > Android Setup..."); - return false; - } - } - else - { - Debug.Log("GameInfo.cs does not exist. Run Window > Google Play Games > Setup > Android Setup..."); - return false; - } -#endif - - return doneSetup; - } - - /// - /// Makes legal identifier from string. - /// Returns a legal C# identifier from the given string. The transformations are: - /// - spaces => underscore _ - /// - punctuation => empty string - /// - leading numbers are prefixed with underscore. - /// - /// the id - /// Key to convert to an identifier. - public static string MakeIdentifier(string key) - { - string s; - string retval = string.Empty; - if (string.IsNullOrEmpty(key)) - { - return "_"; - } - - s = key.Trim().Replace(' ', '_'); - - foreach (char c in s) - { - if (char.IsLetterOrDigit(c) || c == '_') - { - retval += c; - } - } - - return retval; - } - - /// - /// Displays an error dialog. - /// - /// the message - public static void Alert(string s) - { - Alert(GPGSStrings.Error, s); - } - - /// - /// Displays a dialog with the given title and message. - /// - /// the title. - /// the message. - public static void Alert(string title, string message) - { - EditorUtility.DisplayDialog(title, message, GPGSStrings.Ok); - } - - /// - /// Gets the android sdk path. - /// - /// The android sdk path. - public static string GetAndroidSdkPath() - { - string sdkPath = EditorPrefs.GetString("AndroidSdkRoot"); -#if UNITY_2019_1_OR_NEWER - // Unity 2019.x added installation of the Android SDK in the AndroidPlayer directory - // so fallback to searching for it there. - if (string.IsNullOrEmpty(sdkPath) || EditorPrefs.GetBool("SdkUseEmbedded")) - { - string androidPlayerDir = BuildPipeline.GetPlaybackEngineDirectory(BuildTarget.Android, BuildOptions.None); - if (!string.IsNullOrEmpty(androidPlayerDir)) - { - string androidPlayerSdkDir = Path.Combine(androidPlayerDir, "SDK"); - if (Directory.Exists(androidPlayerSdkDir)) - { - sdkPath = androidPlayerSdkDir; - } - } - } -#endif - if (sdkPath != null && (sdkPath.EndsWith("/") || sdkPath.EndsWith("\\"))) - { - sdkPath = sdkPath.Substring(0, sdkPath.Length - 1); - } - - return sdkPath; - } - - /// - /// Determines if the android sdk exists. - /// - /// true if android sdk exists; otherwise, false. - public static bool HasAndroidSdk() - { - string sdkPath = GetAndroidSdkPath(); - return sdkPath != null && sdkPath.Trim() != string.Empty && System.IO.Directory.Exists(sdkPath); - } - - /// - /// Gets the unity major version. - /// - /// The unity major version. - public static int GetUnityMajorVersion() - { -#if UNITY_5 - string majorVersion = Application.unityVersion.Split('.')[0]; - int ver; - if (!int.TryParse(majorVersion, out ver)) - { - ver = 0; - } - - return ver; -#elif UNITY_4_6 - return 4; -#else - return 0; -#endif - } - - /// - /// Checks for the android manifest file exsistance. - /// - /// true, if the file exists false otherwise. - public static bool AndroidManifestExists() - { - string destFilename = ManifestPath; - - return File.Exists(destFilename); - } - - /// - /// Generates the android manifest. - /// - public static void GenerateAndroidManifest() - { - string destFilename = ManifestPath; - - // Generate AndroidManifest.xml - string manifestBody = GPGSUtil.ReadEditorTemplate("template-AndroidManifest"); - - Dictionary overrideValues = - new Dictionary(); - - if (!string.IsNullOrEmpty(GPGSProjectSettings.Instance.Get(SERVICEIDKEY))) - { - overrideValues[NEARBY_PERMISSIONS_PLACEHOLDER] = - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n"; - overrideValues[SERVICEID_ELEMENT_PLACEHOLDER] = - " \n" + - " \n"; - } - else - { - overrideValues[NEARBY_PERMISSIONS_PLACEHOLDER] = ""; - overrideValues[SERVICEID_ELEMENT_PLACEHOLDER] = ""; - } - - foreach (KeyValuePair ent in replacements) - { - string value = - GPGSProjectSettings.Instance.Get(ent.Value, overrideValues); - manifestBody = manifestBody.Replace(ent.Key, value); - } - - GPGSUtil.WriteFile(destFilename, manifestBody); - GPGSUtil.UpdateGameInfo(); - } - - /// - /// Writes the resource identifiers file. This file contains the - /// resource ids copied (downloaded?) from the play game app console. - /// - /// Class directory. - /// Class name. - /// Resource keys. - public static void WriteResourceIds(string classDirectory, string className, Hashtable resourceKeys) - { - string constantsValues = string.Empty; - string[] parts = className.Split('.'); - string dirName = classDirectory; - if (string.IsNullOrEmpty(dirName)) - { - dirName = "Assets"; - } - - string nameSpace = string.Empty; - for (int i = 0; i < parts.Length - 1; i++) - { - dirName += "/" + parts[i]; - if (nameSpace != string.Empty) - { - nameSpace += "."; - } - - nameSpace += parts[i]; - } - - EnsureDirExists(dirName); - foreach (DictionaryEntry ent in resourceKeys) - { - string key = MakeIdentifier((string) ent.Key); - constantsValues += " public const string " + - key + " = \"" + ent.Value + "\"; // \n"; - } - - string fileBody = GPGSUtil.ReadEditorTemplate("template-Constants"); - if (nameSpace != string.Empty) - { - fileBody = fileBody.Replace( - NAMESPACESTARTPLACEHOLDER, - "namespace " + nameSpace + "\n{"); - } - else - { - fileBody = fileBody.Replace(NAMESPACESTARTPLACEHOLDER, string.Empty); - } - - fileBody = fileBody.Replace(CLASSNAMEPLACEHOLDER, parts[parts.Length - 1]); - fileBody = fileBody.Replace(CONSTANTSPLACEHOLDER, constantsValues); - if (nameSpace != string.Empty) - { - fileBody = fileBody.Replace( - NAMESPACEENDPLACEHOLDER, - "}"); - } - else - { - fileBody = fileBody.Replace(NAMESPACEENDPLACEHOLDER, string.Empty); - } - - WriteFile(Path.Combine(dirName, parts[parts.Length - 1] + ".cs"), fileBody); - } - - /// - /// Updates the game info file. This is a generated file containing the - /// app and client ids. - /// - public static void UpdateGameInfo() - { - string fileBody = GPGSUtil.ReadEditorTemplate("template-GameInfo"); - - foreach (KeyValuePair ent in replacements) - { - string value = - GPGSProjectSettings.Instance.Get(ent.Value); - fileBody = fileBody.Replace(ent.Key, value); - } - - GPGSUtil.WriteFile(GameInfoPath, fileBody); - } - - /// - /// Checks the dependencies file and fixes repository paths - /// if they are incorrect (for example if the user moved plugin - /// into some subdirectory). This is a generated file containing - /// the list of dependencies that are needed for the plugin to work. - /// - public static void CheckAndFixDependencies() - { - string depPath = - SlashesToPlatformSeparator(Path.Combine(GPGSUtil.RootPath, - "Editor/GooglePlayGamesPluginDependencies.xml")); - - XmlDocument doc = new XmlDocument(); - doc.Load(depPath); - - XmlNodeList repos = doc.SelectNodes("//androidPackage[contains(@spec,'com.google.games')]//repository"); - foreach (XmlNode repo in repos) - { - if (!Directory.Exists(repo.InnerText)) - { - int pos = repo.InnerText.IndexOf(RootFolderName); - if (pos != -1) - { - repo.InnerText = - Path.Combine(RootPath, repo.InnerText.Substring(pos + RootFolderName.Length + 1)) - .Replace("\\", "/"); - } - } - } - - doc.Save(depPath); - } - - /// - /// Checks the file containing the list of versioned assets and fixes - /// paths to them if they are incorrect (for example if the user moved - /// plugin into some subdirectory). This is a generated file. - /// - public static void CheckAndFixVersionedAssestsPaths() - { - string[] foundPaths = - Directory.GetFiles(RootPath, "GooglePlayGamesPlugin_v*.txt", SearchOption.AllDirectories); - - if (foundPaths.Length == 1) - { - string tmpFilePath = Path.GetTempFileName(); - - StreamWriter writer = new StreamWriter(tmpFilePath); - using (StreamReader reader = new StreamReader(foundPaths[0])) - { - string assetPath; - while ((assetPath = reader.ReadLine()) != null) - { - int pos = assetPath.IndexOf(RootFolderName); - if (pos != -1) - { - assetPath = Path.Combine(RootPath, assetPath.Substring(pos + RootFolderName.Length + 1)) - .Replace("\\", "/"); - } - - writer.WriteLine(assetPath); - } - } - - writer.Flush(); - writer.Close(); - - try - { - File.Copy(tmpFilePath, foundPaths[0], true); - } - finally - { - File.Delete(tmpFilePath); - } - } - } - - /// - /// Ensures the dir exists. - /// - /// Directory to check. - public static void EnsureDirExists(string dir) - { - dir = SlashesToPlatformSeparator(dir); - if (!Directory.Exists(dir)) - { - Directory.CreateDirectory(dir); - } - } - - /// - /// Deletes the dir if exists. - /// - /// Directory to delete. - public static void DeleteDirIfExists(string dir) - { - dir = SlashesToPlatformSeparator(dir); - if (Directory.Exists(dir)) - { - Directory.Delete(dir, true); - } - } - - /// - /// Gets the Google Play Services library version. This is only - /// needed for Unity versions less than 5. - /// - /// The GPS version. - /// Lib proj path. - private static int GetGPSVersion(string libProjPath) - { - string versionFile = libProjPath + "/res/values/version.xml"; - - XmlTextReader reader = new XmlTextReader(new StreamReader(versionFile)); - bool inResource = false; - int version = -1; - - while (reader.Read()) - { - if (reader.Name == "resources") - { - inResource = true; - } - - if (inResource && reader.Name == "integer") - { - if ("google_play_services_version".Equals( - reader.GetAttribute("name"))) - { - reader.Read(); - Debug.Log("Read version string: " + reader.Value); - version = Convert.ToInt32(reader.Value); - } - } - } - - reader.Close(); - return version; - } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs.meta deleted file mode 100644 index 1b70d2c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: fd01714f9ee99447996b878b1ac67540 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef deleted file mode 100644 index 6dc51ca..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "Google.Play.Games.Editor", - "references": [ - "Google.Play.Games" - ], - "includePlatforms": [ - "Editor" - ] -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef.meta deleted file mode 100644 index 8d1f97a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9172e27a923a34eb8b02dc3ab88d3dcd -labels: -- gvh -- gvh_version-0.11.01 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml deleted file mode 100644 index 00029d7..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository - - - - \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml.meta deleted file mode 100644 index 80c4646..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 56e4f40c267bfa268afda2ea9f4846a0 -labels: -- gvh -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt deleted file mode 100644 index 22e8f92..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt +++ /dev/null @@ -1,90 +0,0 @@ -Assets/Plugins/Android/GooglePlayGamesManifest.androidlib/project.properties -Assets/ExternalDependencyManager/Editor/README.md -Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.mdb -Assets/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.169_manifest.txt -Assets/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.VersionHandlerImpl.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll -Assets/ExternalDependencyManager/Editor/1.2.169/Google.IOSResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.PackageManagerResolver.dll.mdb -Assets/ExternalDependencyManager/Editor/1.2.169/Google.JarResolver.dll -Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll -Assets/ExternalDependencyManager/Editor/CHANGELOG.md -Assets/ExternalDependencyManager/Editor/LICENSE -Assets/GooglePlayGames/AssemblyInfo.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5 -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUtil.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSStrings.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSPostBuild.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSDocsUI.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/Google.Play.Games.Editor.asmdef -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSProjectSettings.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSUpgrader.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GPGSAndroidSetupUI.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs -Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs -Assets/PlayServicesResolver/Editor/play-services-resolver_v1.2.137.0.txt diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt.meta deleted file mode 100644 index bb7d115..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPlugin_v0.11.01.txt.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 693a823b8f0ad41fe8231a1b1c8a50da -labels: -- gvh -- gvh_manifest -- gvh_version-0.11.01 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs deleted file mode 100644 index f4cc487..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs +++ /dev/null @@ -1,153 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.Editor -{ - using UnityEngine; - using UnityEditor; - - public class NearbyConnectionUI : EditorWindow - { - private string mNearbyServiceId = string.Empty; - - [MenuItem("Window/Google Play Games/Setup/Nearby Connections setup...", false, 3)] - public static void MenuItemNearbySetup() - { - EditorWindow window = EditorWindow.GetWindow( - typeof(NearbyConnectionUI), true, GPGSStrings.NearbyConnections.Title); - window.minSize = new Vector2(400, 200); - } - - [MenuItem("Window/Google Play Games/Setup/Nearby Connections setup...", true)] - public static bool EnableNearbyMenuItem() - { -#if UNITY_ANDROID - return true; -#else - return false; -#endif - } - - public void OnEnable() - { - mNearbyServiceId = GPGSProjectSettings.Instance.Get(GPGSUtil.SERVICEIDKEY); - } - - public void OnGUI() - { - GUI.skin.label.wordWrap = true; - GUILayout.BeginVertical(); - GUILayout.Space(10); - GUILayout.Label(GPGSStrings.NearbyConnections.Blurb); - GUILayout.Space(10); - - GUILayout.Label(GPGSStrings.Setup.NearbyServiceId, EditorStyles.boldLabel); - GUILayout.Space(10); - GUILayout.Label(GPGSStrings.Setup.NearbyServiceBlurb); - mNearbyServiceId = EditorGUILayout.TextField(GPGSStrings.Setup.NearbyServiceId, - mNearbyServiceId, GUILayout.Width(350)); - - GUILayout.FlexibleSpace(); - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (GUILayout.Button(GPGSStrings.Setup.SetupButton, - GUILayout.Width(100))) - { - DoSetup(); - } - - if (GUILayout.Button("Cancel", GUILayout.Width(100))) - { - this.Close(); - } - - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - GUILayout.Space(20); - GUILayout.EndVertical(); - } - - private void DoSetup() - { - if (PerformSetup(mNearbyServiceId, true)) - { - EditorUtility.DisplayDialog(GPGSStrings.Success, - GPGSStrings.NearbyConnections.SetupComplete, GPGSStrings.Ok); - this.Close(); - } - } - - /// Provide static access to setup for facilitating automated builds. - /// The nearby connections service Id - /// true if building android - public static bool PerformSetup(string nearbyServiceId, bool androidBuild) - { - // check for valid app id - if (!GPGSUtil.LooksLikeValidServiceId(nearbyServiceId)) - { - if (EditorUtility.DisplayDialog( - "Remove Nearby connection permissions? ", - "The service Id is invalid. It must follow package naming rules. " + - "Do you want to remove the AndroidManifest entries for Nearby connections?", - "Yes", - "No")) - { - GPGSProjectSettings.Instance.Set(GPGSUtil.SERVICEIDKEY, null); - GPGSProjectSettings.Instance.Save(); - } - else - { - return false; - } - } - else - { - GPGSProjectSettings.Instance.Set(GPGSUtil.SERVICEIDKEY, nearbyServiceId); - GPGSProjectSettings.Instance.Save(); - } - - if (androidBuild) - { - // create needed directories - GPGSUtil.EnsureDirExists("Assets/Plugins"); - GPGSUtil.EnsureDirExists("Assets/Plugins/Android"); - - // Generate AndroidManifest.xml - GPGSUtil.GenerateAndroidManifest(); - - GPGSProjectSettings.Instance.Set(GPGSUtil.NEARBYSETUPDONEKEY, true); - GPGSProjectSettings.Instance.Save(); - - // Resolve the dependencies - Google.VersionHandler.VerboseLoggingEnabled = true; - Google.VersionHandler.UpdateVersionedAssets(forceUpdate: true); - Google.VersionHandler.Enabled = true; - AssetDatabase.Refresh(); - - Google.VersionHandler.InvokeStaticMethod( - Google.VersionHandler.FindClass( - "Google.JarResolver", - "GooglePlayServices.PlayServicesResolver"), - "MenuResolve", null); - } - - return true; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs.meta deleted file mode 100644 index 686a2c0..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/NearbyConnectionUI.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: b64332a502e18436da5652adbf7e24a3 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository.meta deleted file mode 100644 index b57f758..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a1aac54589c4640cd89900056af3a094 -folderAsset: yes -timeCreated: 1515000812 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com.meta deleted file mode 100644 index fbaa447..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6bfd2e0bf6a79efa5a524c758a029a97 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google.meta deleted file mode 100644 index 5468f34..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 44f501fdbcc7ecb3a9d935d48385fcd7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games.meta deleted file mode 100644 index 1f44553..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ab2c8702a5ac8186e833079b0c2b97eb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support.meta deleted file mode 100644 index 369c14d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7aad2f859f18616f6b634cecc92785db -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01.meta deleted file mode 100644 index 8916fc4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 270a1b374befae139bb007ed9fe42c0a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom deleted file mode 100644 index 9ceb6a0..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom +++ /dev/null @@ -1,23 +0,0 @@ - - - 4.0.0 - com.google.games - gpgs-plugin-support - 0.11.01 - srcaar - - - com.google.android.gms - play-services-games-v2 - 17.0.0 - compile - - - com.google.android.gms - play-services-nearby - 18.0.2 - compile - - - diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5 deleted file mode 100644 index 40046e4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -9964a15c4931746b3709a528c241829e \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5.meta deleted file mode 100644 index ed108cf..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.md5.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 021d4ecf67ff30875941d1d1d3e4273f -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.meta deleted file mode 100644 index 34f141e..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3a8de8e589297f83cbf708663d04784d -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1 deleted file mode 100644 index 894689e..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -f543dbb0a4147fcdb6adf7d44092e41aeed42ffc \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1.meta deleted file mode 100644 index 37e5807..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.pom.sha1.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 2ace5c923ae5a5e4182561bb8b0e47ad -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar deleted file mode 100644 index c5baea5..0000000 Binary files a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar and /dev/null differ diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5 deleted file mode 100644 index e49060f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5 +++ /dev/null @@ -1 +0,0 @@ -ad17f2aceed310327b5dcb1badc6df2e \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5.meta deleted file mode 100644 index 9bee6f3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.md5.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6a5d6cd742873c73f8f0c9a1ac445182 -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.meta deleted file mode 100644 index ee5ace2..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 8a7a2dcd7d551e040938c69456bd0643 -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1 deleted file mode 100644 index cfa688c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1 +++ /dev/null @@ -1 +0,0 @@ -920847b24a3063aa866d56a3815cdf9ce09d142c \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1.meta deleted file mode 100644 index 02964a4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/0.11.01/gpgs-plugin-support-0.11.01.srcaar.sha1.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b8fc53361999b1f4a830505b47234b73 -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml deleted file mode 100644 index a30f6a1..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.google.games - gpgs-plugin-support - - 0.11.01 - - 0.11.01 - - 20220321142410 - - diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5 deleted file mode 100644 index 3cda54a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -317c4c73ab9be4443cbce8d57a8df3e4 \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5.meta deleted file mode 100644 index 1f62e87..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.md5.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b99ac5f1bd7ba77d390d8508c2c3b8cc -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.meta deleted file mode 100644 index 550ae32..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: e9ae03af85334796fa074f4f75bd5426 -labels: -- gvh -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1 b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1 deleted file mode 100644 index b11328c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -a86be37d1603c23020fbbcdf93e73062682cad0b \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1.meta deleted file mode 100644 index af063c3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/maven-metadata.xml.sha1.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 75441663f29e7a430af793277d746c7e -labels: -- gvh -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt deleted file mode 100644 index d32616f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt +++ /dev/null @@ -1,27 +0,0 @@ - - - - - __NEARBY_PERMISSIONS__ - - - - __NEARBY_SERVICE_ELEMENT__ - - - - - - - - - - - diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt.meta deleted file mode 100644 index 58c9d9d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-AndroidManifest.txt.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0e1f3c150256848b1ba98702cfb71220 -labels: -- gvh -- gvh_version-0.11.01 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt deleted file mode 100644 index a1a6180..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// This file is automatically generated DO NOT EDIT! -/// -/// These are the constants defined in the Play Games Console for Game Services -/// Resources. -/// - -__NameSpaceStart__ -public static class __Class__ -{ -__Constant_Properties__ -} -__NameSpaceEnd__ diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt.meta deleted file mode 100644 index 02600dc..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-Constants.txt.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7f2719cb8be514661b7b6aa9986bfe5f -labels: -- gvh -- gvh_version-0.11.01 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt deleted file mode 100644 index 47bb16a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#if UNITY_ANDROID - -namespace GooglePlayGames { - /// - /// This file is automatically generated DO NOT EDIT! - /// - /// These are the constants defined in the Play Games Console for Game Services - /// Resources. - /// - /// - /// File containing information about the game. This is automatically updated by running the - /// platform-appropriate setup commands in the Unity editor (which does a simple search / replace - /// on the IDs in the form "__ID__"). We can check whether any particular field has been updated - /// by checking whether it still retains its initial value - we prevent the constants from being - /// replaced in the aforementioned search/replace by stripping off the leading and trailing "__". - /// - public static class GameInfo { - - private const string UnescapedApplicationId = "APP_ID"; - private const string UnescapedIosClientId = "IOS_CLIENTID"; - private const string UnescapedWebClientId = "WEB_CLIENTID"; - private const string UnescapedNearbyServiceId = "NEARBY_SERVICE_ID"; - - public const string ApplicationId = "__APP_ID__"; // Filled in automatically - public const string IosClientId = "__IOS_CLIENTID__"; // Filled in automatically - public const string WebClientId = "__WEB_CLIENTID__"; // Filled in automatically - public const string NearbyConnectionServiceId = "__NEARBY_SERVICE_ID__"; - - public static bool ApplicationIdInitialized() { - return !string.IsNullOrEmpty(ApplicationId) && !ApplicationId.Equals(ToEscapedToken(UnescapedApplicationId)); - } - - public static bool IosClientIdInitialized() { - return !string.IsNullOrEmpty(IosClientId) && !IosClientId.Equals(ToEscapedToken(UnescapedIosClientId)); - } - - public static bool WebClientIdInitialized() { - return !string.IsNullOrEmpty(WebClientId) && !WebClientId.Equals(ToEscapedToken(UnescapedWebClientId)); - } - - public static bool NearbyConnectionsInitialized() { - return !string.IsNullOrEmpty(NearbyConnectionServiceId) && - !NearbyConnectionServiceId.Equals(ToEscapedToken(UnescapedNearbyServiceId)); - } - - /// - /// Returns an escaped token (i.e. one flanked with "__") for the passed token - /// - /// The escaped token. - /// The Token - private static string ToEscapedToken(string token) { - return string.Format("__{0}__", token); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt.meta deleted file mode 100644 index 46c07f3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Editor/template-GameInfo.txt.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c6fa1c0456d174d298bf8dd66f584e9e -labels: -- gvh -- gvh_version-0.11.01 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard.meta deleted file mode 100644 index df88b87..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 484e9bbdd408c50d993232965d92e0cb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt deleted file mode 100644 index 63c7b08..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt +++ /dev/null @@ -1,20 +0,0 @@ --keep class com.google.android.gms.games.leaderboard.** { *; } --keep class com.google.android.gms.games.snapshot.** { *; } --keep class com.google.android.gms.games.achievement.** { *; } --keep class com.google.android.gms.games.event.** { *; } --keep class com.google.android.gms.games.stats.** { *; } --keep class com.google.android.gms.games.* { *; } --keep class com.google.android.gms.common.api.ResultCallback { *; } --keep class com.google.android.gms.signin.** { *; } --keep class com.google.android.gms.dynamic.** { *; } --keep class com.google.android.gms.dynamite.** { *; } --keep class com.google.android.gms.tasks.** { *; } --keep class com.google.android.gms.security.** { *; } --keep class com.google.android.gms.base.** { *; } --keep class com.google.android.gms.actions.** { *; } --keep class com.google.games.bridge.** { *; } --keep class com.google.android.gms.common.ConnectionResult { *; } --keep class com.google.android.gms.common.GooglePlayServicesUtil { *; } --keep class com.google.android.gms.common.api.** { *; } --keep class com.google.android.gms.common.data.DataBufferUtils { *; } --keep class com.google.android.gms.nearby.** { *; } diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt.meta deleted file mode 100644 index 1d27bd3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Proguard/games.txt.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 4176788a1a4cdec9e8100aceecddd212 -labels: -- gvh -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime.meta deleted file mode 100644 index a47f66a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 831a102b513bb304da26f7ca18913f3e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef deleted file mode 100644 index 887a518..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Google.Play.Games", - "includePlatforms": [ - "Android", - "Editor" - ] -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef.meta deleted file mode 100644 index 2d75bae..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1ed07ff861e5f468287b0baef844706d -labels: -- gvh -- gvh_version-0.11.01 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts.meta deleted file mode 100644 index 519d189..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6ac644c502fda71c8a1a146903d950de -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi.meta deleted file mode 100644 index 80e1ea0..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 0a565e85253b345878939982a360e0b6 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs deleted file mode 100644 index 738e6fb..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs +++ /dev/null @@ -1,201 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - using System; - - /// Data interface for retrieving achievement information. - /// - /// There are 3 states an achievement can be in: - /// - /// Hidden - indicating the name and description of the achievement is - /// not visible to the player. - /// - /// Revealed - indicating the name and description of the achievement is - /// visible to the player. - /// Unlocked - indicating the player has unlocked, or achieved, the achievment. - /// - /// Achievements has two types, standard which is unlocked in one step, - /// and incremental, which require multiple steps to unlock. - /// - /// - public class Achievement - { - static readonly DateTime UnixEpoch = - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); - - private string mId = string.Empty; - private bool mIsIncremental = false; - private bool mIsRevealed = false; - private bool mIsUnlocked = false; - private int mCurrentSteps = 0; - private int mTotalSteps = 0; - private string mDescription = string.Empty; - private string mName = string.Empty; - private long mLastModifiedTime = 0; - private ulong mPoints; - private string mRevealedImageUrl; - private string mUnlockedImageUrl; - - /// - /// Returns a that represents the current . - /// - /// A that represents the current . - public override string ToString() - { - return string.Format( - "[Achievement] id={0}, name={1}, desc={2}, type={3}, revealed={4}, unlocked={5}, steps={6}/{7}", - mId, mName, mDescription, mIsIncremental ? "INCREMENTAL" : "STANDARD", - mIsRevealed, mIsUnlocked, mCurrentSteps, mTotalSteps); - } - - public Achievement() - { - } - - /// - /// Indicates whether this achievement is incremental. - /// - public bool IsIncremental - { - get { return mIsIncremental; } - - set { mIsIncremental = value; } - } - - /// - /// The number of steps the user has gone towards unlocking this achievement. - /// - public int CurrentSteps - { - get { return mCurrentSteps; } - - set { mCurrentSteps = value; } - } - - /// - /// The total number of steps needed to unlock this achievement. - /// - public int TotalSteps - { - get { return mTotalSteps; } - - set { mTotalSteps = value; } - } - - /// - /// Indicates whether the achievement is unlocked or not. - /// - public bool IsUnlocked - { - get { return mIsUnlocked; } - - set { mIsUnlocked = value; } - } - - /// - /// Indicates whether the achievement is revealed or not (hidden). - /// - public bool IsRevealed - { - get { return mIsRevealed; } - - set { mIsRevealed = value; } - } - - /// - /// The ID string of this achievement. - /// - public string Id - { - get { return mId; } - - set { mId = value; } - } - - /// - /// The description of this achievement. - /// - public string Description - { - get { return this.mDescription; } - - set { mDescription = value; } - } - - /// - /// The name of this achievement. - /// - public string Name - { - get { return this.mName; } - - set { mName = value; } - } - - /// - /// The date and time the state of the achievement was modified. - /// - /// - /// The value is invalid (-1 long) if the achievement state has - /// never been updated. - /// - public DateTime LastModifiedTime - { - get { return UnixEpoch.AddMilliseconds(mLastModifiedTime); } - - set - { - TimeSpan ts = value - UnixEpoch; - mLastModifiedTime = (long) ts.TotalMilliseconds; - } - } - - /// - /// The number of experience points earned for unlocking this Achievement. - /// - public ulong Points - { - get { return mPoints; } - - set { mPoints = value; } - } - - /// - /// The URL to the image to display when the achievement is revealed. - /// - public string RevealedImageUrl - { - get { return mRevealedImageUrl; } - - set { mRevealedImageUrl = value; } - } - - /// - /// The URL to the image to display when the achievement is unlocked. - /// - public string UnlockedImageUrl - { - get { return mUnlockedImageUrl; } - - set { mUnlockedImageUrl = value; } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs.meta deleted file mode 100644 index 3d3860a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Achievement.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: b20fc2fda369044ba962d1d9115c4c63 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs deleted file mode 100644 index a40cc4b..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - /// - /// Common status codes. - /// See https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes - /// - public enum CommonStatusCodes - { - /// The operation was successful, but the device's cache was used. - SuccessCached = -1, - - /// The operation was successful. - Success = 0, - - /// Google Play services is missing on this device. - ServiceMissing = 1, - - /// The installed version of Google Play services is out of date. - ServiceVersionUpdateRequired = 2, - - /// The installed version of Google Play services has been disabled on this device. - ServiceDisabled = 3, - - /// The client attempted to connect to the service but the user is not signed in. - SignInRequired = 4, - - /// The client attempted to connect to the service with an invalid account name specified. - InvalidAccount = 5, - - /// Completing the operation requires some form of resolution. - ResolutionRequired = 6, - - /// A network error occurred. - NetworkError = 7, - - /// An internal error occurred. - InternalError = 8, - - /// The version of the Google Play services installed on this device is not authentic. - ServiceInvalid = 9, - - /// The application is misconfigured. - DeveloperError = 10, - - /// The application is not licensed to the user. - LicenseCheckFailed = 11, - - /// The operation failed with no more detailed information. - Error = 13, - - /// A blocking call was interrupted while waiting and did not run to completion. - Interrupted = 14, - - /// Timed out while awaiting the result. - Timeout = 15, - - /// The result was canceled either due to client disconnect or cancel(). - Canceled = 16, - - /// The client attempted to call a method from an API that failed to connect. - ApiNotConnected = 17, - - /// Invalid credentials were provided. - AuthApiInvalidCredentials = 3000, - - /// Access is forbidden. - AuthApiAccessForbidden = 3001, - - /// Error related to the client. - AuthApiClientError = 3002, - - /// Error related to the server. - AuthApiServerError = 3003, - - /// Error related to token. - AuthTokenError = 3004, - - /// Error related to auth URL resolution. - AuthUrlResolution = 3005 - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs.meta deleted file mode 100644 index 2b50788..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonStatusCodes.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: cd54f7a2763f74ce191bdd3efa0a44d5 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs deleted file mode 100644 index e7ae3ce..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs +++ /dev/null @@ -1,205 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi -{ - /// - /// A enum describing where game data can be fetched from. - /// - public enum DataSource - { - /// - /// Allow a read from either a local cache, or the network. - /// - /// Values from the cache may be - /// stale (potentially producing more write conflicts), but reading from cache may still - /// allow reads to succeed if the device does not have internet access and may complete more - /// quickly (as the reads can occur locally rather requiring network roundtrips). - /// - ReadCacheOrNetwork, - - /// - /// Only allow reads from network. - /// - /// This guarantees any returned values were current at the time - /// the read succeeded, but prevents reads from succeeding if the network is unavailable for - /// any reason. - /// - ReadNetworkOnly - } - - /// Native response status codes - /// These values are returned by the native SDK API. - /// NOTE: These values are different than the CommonStatusCodes. - /// - public enum ResponseStatus - { - /// The operation was successful. - Success = 1, - - /// The operation was successful, but the device's cache was used. - SuccessWithStale = 2, - - /// The application is not licensed to the user. - LicenseCheckFailed = -1, - - /// An internal error occurred. - InternalError = -2, - - /// The player is not authorized to perform the operation. - NotAuthorized = -3, - - /// The installed version of Google Play services is out of date. - VersionUpdateRequired = -4, - - /// Timed out while awaiting the result. - Timeout = -5, - - ///< summary> - /// Constant indicating that the developer does not have access to the friends list, but can - /// call the AskForLoadFriendsResolution API to show a consent dialog. - /// - ResolutionRequired = -6, - } - - /// Native response status codes for UI operations. - /// These values are returned by the native SDK API. - /// - public enum UIStatus - { - /// The result is valid. - Valid = 1, - - /// An internal error occurred. - InternalError = -2, - - /// The player is not authorized to perform the operation. - NotAuthorized = -3, - - /// The installed version of Google Play services is out of date. - VersionUpdateRequired = -4, - - /// Timed out while awaiting the result. - Timeout = -5, - - /// UI closed by user. - UserClosedUI = -6, - UiBusy = -12, - - /// An network error occurred. - NetworkError = -20, - } - - /// Values specifying the start location for fetching scores. - public enum LeaderboardStart - { - /// Start fetching scores from the top of the list. - TopScores = 1, - - /// Start fetching relative to the player's score. - PlayerCentered = 2, - } - - /// Values specifying which leaderboard timespan to use. - public enum LeaderboardTimeSpan - { - /// Daily scores. The day resets at 11:59 PM PST. - Daily = 1, - - /// Weekly scores. The week resets at 11:59 PM PST on Sunday. - Weekly = 2, - - /// All time scores. - AllTime = 3, - } - - /// Values specifying which leaderboard collection to use. - public enum LeaderboardCollection - { - /// Public leaderboards contain the scores of players who are sharing their gameplay publicly. - Public = 1, - - /// Social leaderboards contain the scores of players in the viewing player's circles. - Social = 2, - } - - public enum FriendsListVisibilityStatus - { - ///< summary> - /// Constant indicating that currently it's unknown if the friends list is visible to the - /// game, game can ask for permission from user. - /// - Unknown = 0, - - /// Constant indicating that the friends list is currently visible to the game. - Visible = 1, - - ///< summary> - /// Constant indicating that the developer does not have access to the friends list, but can - /// call the AskForLoadFriendsResolution API to show a consent dialog. - /// - ResolutionRequired = 2, - - ///< summary> - /// Constant indicating that the friends list is currently unavailable for this user, and it - /// is not possible to request access at this time, either because the user has permanently - /// declined or the friends feature is not available to them. In this state, any attempts to - /// request - /// access to the friends list will be unsuccessful. - /// - Unavailable = 3, - - /// An network error occurred. - NetworkError = -4, - - /// The player is not authorized to perform the operation. - NotAuthorized = -5, - } - - public enum LoadFriendsStatus - { - /// An unknown value to return when loadFriends is not available. - Unknown = 0, - - /// All the friends have been loaded. - Completed = 1, - - /// There are more friends to load. - LoadMore = 2, - - /// - /// The game doesn't have permission to access the player's friends list. No friends loaded. - /// - ResolutionRequired = -3, - - /// An internal error occurred. - InternalError = -4, - - /// The player is not authorized to perform the operation. - NotAuthorized = -5, - - /// An network error occurred. - NetworkError = -6, - } - - public class CommonTypesUtil - { - public static bool StatusIsSuccess(ResponseStatus status) - { - return ((int) status) > 0; - } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs.meta deleted file mode 100644 index 412ee57..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/CommonTypes.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 1c5d1cb1974d14c0c8b32fcf00089556 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs deleted file mode 100644 index 6d2ed77..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs +++ /dev/null @@ -1,298 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - using System; - using GooglePlayGames.OurUtils; - using UnityEngine.SocialPlatforms; - - /// - /// Dummy client used in Editor. - /// - /// Google Play Game Services are not supported in the Editor - /// environment, so this client is used as a placeholder. - /// - public class DummyClient : IPlayGamesClient - { - public void Authenticate(Action callback) - { - LogUsage(); - if (callback != null) - { - callback(SignInStatus.Canceled); - } - } - - public void ManuallyAuthenticate(Action callback) - { - LogUsage(); - if (callback != null) - { - callback(SignInStatus.Canceled); - } - } - - public bool IsAuthenticated() - { - LogUsage(); - return false; - } - - public void RequestServerSideAccess(bool forceRefreshToken, Action callback) - { - LogUsage(); - if (callback != null) - { - callback(null); - } - } - - public string GetUserId() - { - LogUsage(); - return "DummyID"; - } - - public void GetPlayerStats(Action callback) - { - LogUsage(); - callback(CommonStatusCodes.ApiNotConnected, new PlayerStats()); - } - - public string GetUserDisplayName() - { - LogUsage(); - return "Player"; - } - - public string GetUserImageUrl() - { - LogUsage(); - return null; - } - - public void LoadUsers(string[] userIds, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(null); - } - } - - public void LoadAchievements(Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(null); - } - } - - public void UnlockAchievement(string achId, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public void RevealAchievement(string achId, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public void IncrementAchievement(string achId, int steps, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public void SetStepsAtLeast(string achId, int steps, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public void ShowAchievementsUI(Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(UIStatus.VersionUpdateRequired); - } - } - - public void AskForLoadFriendsResolution(Action callback) { - LogUsage(); - if (callback != null) { - callback.Invoke(UIStatus.VersionUpdateRequired); - } - } - - public LoadFriendsStatus GetLastLoadFriendsStatus() { - LogUsage(); - return LoadFriendsStatus.Unknown; - } - - public void LoadFriends(int pageSize, bool forceReload, - Action callback) { - LogUsage(); - if (callback != null) { - callback.Invoke(LoadFriendsStatus.Unknown); - } - } - - public void LoadMoreFriends(int pageSize, Action callback) { - LogUsage(); - if (callback != null) { - callback.Invoke(LoadFriendsStatus.Unknown); - } - } - - public void ShowCompareProfileWithAlternativeNameHintsUI(string userId, - string otherPlayerInGameName, - string currentPlayerInGameName, - Action callback) { - LogUsage(); - if (callback != null) { - callback.Invoke(UIStatus.VersionUpdateRequired); - } - } - - public void GetFriendsListVisibility(bool forceReload, - Action callback) { - LogUsage(); - if (callback != null) { - callback.Invoke(FriendsListVisibilityStatus.Unknown); - } - } - - public void ShowLeaderboardUI( - string leaderboardId, - LeaderboardTimeSpan span, - Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(UIStatus.VersionUpdateRequired); - } - } - - public int LeaderboardMaxResults() - { - return 25; - } - - public void LoadScores( - string leaderboardId, - LeaderboardStart start, - int rowCount, - LeaderboardCollection collection, - LeaderboardTimeSpan timeSpan, - Action callback) - { - LogUsage(); - if (callback != null) - { - callback(new LeaderboardScoreData( - leaderboardId, - ResponseStatus.LicenseCheckFailed)); - } - } - - public void LoadMoreScores( - ScorePageToken token, - int rowCount, - Action callback) - { - LogUsage(); - if (callback != null) - { - callback(new LeaderboardScoreData( - token.LeaderboardId, - ResponseStatus.LicenseCheckFailed)); - } - } - - public void SubmitScore(string leaderboardId, long score, Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public void SubmitScore( - string leaderboardId, - long score, - string metadata, - Action callback) - { - LogUsage(); - if (callback != null) - { - callback.Invoke(false); - } - } - - public SavedGame.ISavedGameClient GetSavedGameClient() - { - LogUsage(); - return null; - } - - public GooglePlayGames.BasicApi.Events.IEventsClient GetEventsClient() - { - LogUsage(); - return null; - } - - public void LoadFriends(Action callback) - { - LogUsage(); - callback(false); - } - - public IUserProfile[] GetFriends() - { - LogUsage(); - return new IUserProfile[0]; - } - - private static void LogUsage() - { - Logger.d("Received method call on DummyClient - using stub implementation."); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs.meta deleted file mode 100644 index 0d968f6..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 2c600182c9892457e92f885549bd838a -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events.meta deleted file mode 100644 index fa1d608..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 672ea858ca3b74efb9d0981849563065 -folderAsset: yes -timeCreated: 1435699548 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs deleted file mode 100644 index 4938bce..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace GooglePlayGames.BasicApi.Events -{ - internal class Event : IEvent - { - private string mId; - private string mName; - private string mDescription; - private string mImageUrl; - private ulong mCurrentCount; - private EventVisibility mVisibility; - - internal Event(string id, string name, string description, string imageUrl, - ulong currentCount, EventVisibility visibility) - { - mId = id; - mName = name; - mDescription = description; - mImageUrl = imageUrl; - mCurrentCount = currentCount; - mVisibility = visibility; - } - - public string Id - { - get { return mId; } - } - - public string Name - { - get { return mName; } - } - - public string Description - { - get { return mDescription; } - } - - public string ImageUrl - { - get { return mImageUrl; } - } - - public ulong CurrentCount - { - get { return mCurrentCount; } - } - - public EventVisibility Visibility - { - get { return mVisibility; } - } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs.meta deleted file mode 100644 index e0c92e0..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/Event.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: ce7f6801baead4bbda584bb96882e78b -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs deleted file mode 100644 index 73d8477..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -namespace GooglePlayGames.BasicApi.Events -{ - public enum EventVisibility - { - Hidden = 1, - Revealed = 2, - } - - /// - /// Data object representing an Event. for more. - /// - public interface IEvent - { - /// - /// The ID of the event. - /// - string Id { get; } - - /// - /// The name of the event. - /// - string Name { get; } - - /// - /// The description of the event. - /// - string Description { get; } - - /// - /// The URL of the image for the event. Empty if there is no image for this event. - /// - /// The image URL. - string ImageUrl { get; } - - /// - /// The current count for this event. - /// - ulong CurrentCount { get; } - - /// - /// The visibility of the event. - /// - EventVisibility Visibility { get; } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs.meta deleted file mode 100644 index 00d4db3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEvent.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 7e4f4f47218d14208a8ae0f676e1bca4 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs deleted file mode 100644 index ccdd55f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#if UNITY_ANDROID -namespace GooglePlayGames.BasicApi.Events -{ - using System; - using System.Collections.Generic; - - /// - /// An interface for interacting with events. - /// - /// See online - /// documentation for Events for more information. - /// - /// All callbacks in this interface must be invoked on the game thread. - /// - public interface IEventsClient - { - /// - /// Fetches all events defined for this game. - /// - /// The source of the event (i.e. whether we can return stale cached - /// values). - /// A callback for the results of the request. The passed list will only - /// be non-empty if the request succeeded. This callback will be invoked on the game thread. - /// - void FetchAllEvents(DataSource source, Action> callback); - - /// - /// Fetchs the event with the specified ID. - /// - /// The source of the event (i.e. whether we can return stale cached - /// values). - /// The ID of the event. - /// A callback for the result of the event. If the request failed, the - /// passed event will be null. This callback will be invoked on the game thread. - void FetchEvent(DataSource source, string eventId, Action callback); - - /// - /// Increments the indicated event. - /// - /// The ID of the event to increment. - /// The number of steps to increment by. - void IncrementEvent(string eventId, uint stepsToIncrement); - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs.meta deleted file mode 100644 index 7aecf9c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Events/IEventsClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: da57ba264ec114c57b8352923847ec34 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs deleted file mode 100644 index e47826d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs +++ /dev/null @@ -1,362 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - using System; - using UnityEngine.SocialPlatforms; - - /// - /// Defines an abstract interface for a Play Games Client. - /// - /// Concrete implementations - /// might be, for example, the client for Android or for iOS. One fundamental concept - /// that implementors of this class must adhere to is stable authentication state. - /// This means that once Authenticate() returns true through its callback, the user is - /// considered to be forever after authenticated while the app is running. The implementation - /// must make sure that this is the case -- for example, it must try to silently - /// re-authenticate the user if authentication is lost or wait for the authentication - /// process to get fixed if it is temporarily in a bad state (such as when the - /// Activity in Android has just been brought to the foreground and the connection to - /// the Games services hasn't yet been established). To the user of this - /// interface, once the user is authenticated, they're forever authenticated. - /// Unless, of course, there is an unusual permanent failure such as the underlying - /// service dying, in which it's acceptable that API method calls will fail. - /// - /// All methods can be called from the game thread. The user of this interface - /// DOES NOT NEED to call them from the UI thread of the game. Transferring to the UI - /// thread when necessary is a responsibility of the implementors of this interface. - /// - /// CALLBACKS: all callbacks must be invoked in Unity's main thread. - /// Implementors of this interface must guarantee that (suggestion: use - /// ). - /// - public interface IPlayGamesClient - { - /// - /// Returns the result of the automatic sign-in attempt. - /// - /// This returns the result - /// - /// Callback - void Authenticate(Action callback); - - /// - /// Manually requests that your game performs sign in with Play Games Services. - /// - /// - /// Note that a sign-in attempt will be made automatically when your game's application - /// started. For this reason most games will not need to manually request to perform sign-in - /// unless the automatic sign-in attempt failed and your game requires access to Play Games - /// Services. - /// - /// - void ManuallyAuthenticate(Action callback); - - /// - /// Returns whether or not user is authenticated. - /// - /// true if the user is authenticated; otherwise, false. - bool IsAuthenticated(); - - /// - /// Requests server-side access to Player Games Services for the currently signed in player. - /// - /// When requested an authorization code is returned that can be used by your game-server to - /// exchange for an access token and conditionally a refresh token (when {@code forceRefreshToken} - /// is true). The access token may then be used by your game-server to access the Play Games - /// Services web APIs. This is commonly used to complete a sign-in flow by verifying the Play Games - /// Services player id. - /// - ///

If {@code forceRefreshToken} is true, when exchanging the authorization code a refresh token - /// will be returned in addition to the access token. The refresh token allows the game-server to - /// request additional access tokens, allowing your game-server to continue accesses Play Games - /// Services while the user is not actively playing your app. - /// - /// - /// - /// If {@code true} when the returned authorization code is exchanged a - /// refresh token will be included in addition to an access token. - /// - void RequestServerSideAccess(bool forceRefreshToken, Action callback); - - ///

- /// Returns the authenticated user's ID. Note that this value may change if a user signs - /// on and signs in with a different account. - /// - /// The user's ID, null if the user is not logged in. - string GetUserId(); - - /// - /// Loads friends of the authenticated user. This loads the entire list of friends. - /// - /// Callback invoked when complete. bool argument - /// indicates success. - void LoadFriends(Action callback); - - /// - /// Returns a human readable name for the user, if they are logged in. - /// - /// The user's human-readable name. null if they are not logged - /// in - string GetUserDisplayName(); - - /// - /// Returns the user's avatar url, if they are logged in and have an avatar. - /// - /// The URL to load the avatar image. null if they are not logged - /// in - string GetUserImageUrl(); - - /// Gets the player stats. - /// Callback for response. - void GetPlayerStats(Action callback); - - /// - /// Loads the users specified. This is mainly used by the leaderboard - /// APIs to get the information of a high scorer. - /// - /// User identifiers. - /// Callback. - void LoadUsers(string[] userIds, Action callback); - - /// - /// Loads the achievements for the current signed in user and invokes - /// the callback. - /// - void LoadAchievements(Action callback); - - /// - /// Unlocks the achievement with the passed identifier. - /// - /// If the operation succeeds, the callback - /// will be invoked on the game thread with true. If the operation fails, the - /// callback will be invoked with false. This operation will immediately fail if - /// the user is not authenticated (i.e. the callback will immediately be invoked with - /// false). If the achievement is already unlocked, this call will - /// succeed immediately. - /// - /// The ID of the achievement to unlock. - /// Callback used to indicate whether the operation - /// succeeded or failed. - void UnlockAchievement(string achievementId, Action successOrFailureCalllback); - - /// - /// Reveals the achievement with the passed identifier. - /// - /// If the operation succeeds, the callback - /// will be invoked on the game thread with true. If the operation fails, the - /// callback will be invoked with false. This operation will immediately fail if - /// the user is not authenticated (i.e. the callback will immediately be invoked with - /// false). If the achievement is already in a revealed state, this call will - /// succeed immediately. - /// - /// The ID of the achievement to reveal. - /// Callback used to indicate whether the operation - /// succeeded or failed. - void RevealAchievement(string achievementId, Action successOrFailureCalllback); - - /// - /// Increments the achievement with the passed identifier. - /// - /// If the operation succeeds, the - /// callback will be invoked on the game thread with true. If the operation - /// fails, the callback will be invoked with false. This operation will - /// immediately fail if the user is not authenticated (i.e. the callback will immediately be - /// invoked with false). - /// - /// The ID of the achievement to increment. - /// The number of steps to increment by. - /// Callback used to indicate whether the operation - /// succeeded or failed. - void IncrementAchievement(string achievementId, int steps, - Action successOrFailureCalllback); - - /// - /// Set an achievement to have at least the given number of steps completed. - /// - /// - /// Calling this method while the achievement already has more steps than - /// the provided value is a no-op. Once the achievement reaches the - /// maximum number of steps, the achievement is automatically unlocked, - /// and any further mutation operations are ignored. - /// - /// Ach identifier. - /// Steps. - /// Callback. - void SetStepsAtLeast(string achId, int steps, Action callback); - - /// - /// Shows the appropriate platform-specific achievements UI. - /// The callback to invoke when complete. If null, - /// no callback is called. - /// - void ShowAchievementsUI(Action callback); - - /// - /// Shows the appropriate platform-specific friends sharing UI. - /// The callback to invoke when complete. If null, - /// no callback is called. - /// - void AskForLoadFriendsResolution(Action callback); - - /// - /// Returns the latest LoadFriendsStatus obtained from loading friends. - /// - LoadFriendsStatus GetLastLoadFriendsStatus(); - - /// - /// Shows the Play Games Player Profile UI for a specific user identifier. - /// - /// User Identifier. - /// - /// The game's own display name of the player referred to by userId. - /// - /// - /// The game's own display name of the current player. - /// - /// Callback invoked upon completion. - void ShowCompareProfileWithAlternativeNameHintsUI( - string otherUserId, string otherPlayerInGameName, string currentPlayerInGameName, - Action callback); - - /// - /// Returns if the user has allowed permission for the game to access the friends list. - /// - /// If true, this call will clear any locally cached data and - /// attempt to fetch the latest data from the server. Normally, this should be set to {@code - /// false} to gain advantages of data caching. Callback - /// invoked upon completion. - void GetFriendsListVisibility(bool forceReload, Action callback); - - /// - /// Loads the first page of the user's friends - /// - /// - /// The number of entries to request for this initial page. Note that if cached - /// data already exists, the returned buffer may contain more than this size, but it is - /// guaranteed to contain at least this many if the collection contains enough records. - /// - /// - /// If true, this call will clear any locally cached data and attempt to - /// fetch the latest data from the server. This would commonly be used for something like a - /// user-initiated refresh. Normally, this should be set to {@code false} to gain advantages - /// of data caching. - /// Callback invoked upon completion. - void LoadFriends(int pageSize, bool forceReload, Action callback); - - /// - /// Loads the friends list page - /// - /// - /// The number of entries to request for this page. Note that if cached data already - /// exists, the returned buffer may contain more than this size, but it is guaranteed - /// to contain at least this many if the collection contains enough records. - /// - /// - void LoadMoreFriends(int pageSize, Action callback); - - /// - /// Shows the leaderboard UI for a specific leaderboard. - /// - /// If the passed ID is null, all leaderboards are displayed. - /// - /// The leaderboard to display. null to display - /// all. - /// Timespan to display for the leaderboard - /// If non-null, the callback to invoke when the - /// leaderboard is dismissed. - /// - void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, - Action callback); - - /// - /// Loads the score data for the given leaderboard. - /// - /// Leaderboard identifier. - /// Start indicating the top scores or player centric - /// max number of scores to return. non-positive indicates - /// no rows should be returned. This causes only the summary info to - /// be loaded. This can be limited - /// by the SDK. - /// leaderboard collection: public or social - /// leaderboard timespan - /// callback with the scores, and a page token. - /// The token can be used to load next/prev pages. - void LoadScores(string leaderboardId, LeaderboardStart start, int rowCount, - LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, - Action callback); - - /// - /// Loads the more scores for the leaderboard. - /// - /// The token is accessed - /// by calling LoadScores() with a positive row count. - /// - /// Token for tracking the score loading. - /// max number of scores to return. - /// This can be limited by the SDK. - /// Callback. - void LoadMoreScores(ScorePageToken token, int rowCount, - Action callback); - - /// - /// Returns the max number of scores returned per call. - /// - /// The max results. - int LeaderboardMaxResults(); - - /// - /// Submits the passed score to the passed leaderboard. - /// - /// This operation will immediately fail - /// if the user is not authenticated (i.e. the callback will immediately be invoked with - /// false). - /// - /// Leaderboard identifier. - /// Score. - /// Callback used to indicate whether the operation - /// succeeded or failed. - void SubmitScore(string leaderboardId, long score, Action successOrFailureCalllback); - - /// - /// Submits the score for the currently signed-in player. - /// - /// Score. - /// leaderboard id. - /// metadata about the score. - /// Callback upon completion. - void SubmitScore(string leaderboardId, long score, string metadata, - Action successOrFailureCalllback); - - /// - /// Gets the saved game client. - /// - /// The saved game client. - SavedGame.ISavedGameClient GetSavedGameClient(); - - /// - /// Gets the events client. - /// - /// The events client. - Events.IEventsClient GetEventsClient(); - - IUserProfile[] GetFriends(); - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs.meta deleted file mode 100644 index 21ffabe..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 9138e04e4459148c680055b40ad324c0 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs deleted file mode 100644 index 1c80761..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - using System.Collections.Generic; - using UnityEngine.SocialPlatforms; - - /// - /// Leaderboard score data. This is the callback data - /// when loading leaderboard scores. There are several SDK - /// API calls needed to be made to collect all the required data, - /// so this class is used to simplify the response. - /// - public class LeaderboardScoreData - { - private string mId; - private ResponseStatus mStatus; - private ulong mApproxCount; - private string mTitle; - private IScore mPlayerScore; - private ScorePageToken mPrevPage; - private ScorePageToken mNextPage; - private List mScores = new List(); - - internal LeaderboardScoreData(string leaderboardId) - { - mId = leaderboardId; - } - - internal LeaderboardScoreData(string leaderboardId, ResponseStatus status) - { - mId = leaderboardId; - mStatus = status; - } - - public bool Valid - { - get - { - return mStatus == ResponseStatus.Success || - mStatus == ResponseStatus.SuccessWithStale; - } - } - - public ResponseStatus Status - { - get { return mStatus; } - - internal set { mStatus = value; } - } - - public ulong ApproximateCount - { - get { return mApproxCount; } - - internal set { mApproxCount = value; } - } - - public string Title - { - get { return mTitle; } - - internal set { mTitle = value; } - } - - public string Id - { - get { return mId; } - - internal set { mId = value; } - } - - public IScore PlayerScore - { - get { return mPlayerScore; } - - internal set { mPlayerScore = value; } - } - - public IScore[] Scores - { - get { return mScores.ToArray(); } - } - - internal int AddScore(PlayGamesScore score) - { - mScores.Add(score); - return mScores.Count; - } - - public ScorePageToken PrevPageToken - { - get { return mPrevPage; } - - internal set { mPrevPage = value; } - } - - public ScorePageToken NextPageToken - { - get { return mNextPage; } - - internal set { mNextPage = value; } - } - - public override string ToString() - { - return string.Format("[LeaderboardScoreData: mId={0}, " + - " mStatus={1}, mApproxCount={2}, mTitle={3}]", - mId, mStatus, mApproxCount, mTitle); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs.meta deleted file mode 100644 index 1fb80aa..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/LeaderboardScoreData.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 8e369c64e8c9f4571a8847f37848c37e -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby.meta deleted file mode 100644 index 0286871..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: c980790a380df4850b17a208e544d062 -folderAsset: yes -timeCreated: 1435699549 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs deleted file mode 100644 index 1220501..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using System; - using System.Collections.Generic; - using GooglePlayGames.OurUtils; - - public struct AdvertisingResult - { - private readonly ResponseStatus mStatus; - private readonly string mLocalEndpointName; - - public AdvertisingResult(ResponseStatus status, string localEndpointName) - { - this.mStatus = status; - this.mLocalEndpointName = Misc.CheckNotNull(localEndpointName); - } - - public bool Succeeded - { - get { return mStatus == ResponseStatus.Success; } - } - - public ResponseStatus Status - { - get { return mStatus; } - } - - public string LocalEndpointName - { - get { return mLocalEndpointName; } - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs.meta deleted file mode 100644 index 4d1472e..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/AdvertisingResult.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 941324a6338664af6a9faf5b88cad408 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs deleted file mode 100644 index e7183af..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using GooglePlayGames.OurUtils; - - public struct ConnectionRequest - { - private readonly EndpointDetails mRemoteEndpoint; - private readonly byte[] mPayload; - - public ConnectionRequest(string remoteEndpointId, - string remoteEndpointName, string serviceId, byte[] payload) - { - Logger.d("Constructing ConnectionRequest"); - mRemoteEndpoint = new EndpointDetails(remoteEndpointId, remoteEndpointName, serviceId); - this.mPayload = Misc.CheckNotNull(payload); - } - - public EndpointDetails RemoteEndpoint - { - get { return mRemoteEndpoint; } - } - - public byte[] Payload - { - get { return mPayload; } - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs.meta deleted file mode 100644 index 04b0414..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionRequest.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: c7f9bb6b249224f99ad05a87d3e4ee34 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs deleted file mode 100644 index 4a915ad..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using GooglePlayGames.OurUtils; - - public struct ConnectionResponse - { - private static readonly byte[] EmptyPayload = new byte[0]; - - public enum Status - { - Accepted, - Rejected, - ErrorInternal, - ErrorNetworkNotConnected, - ErrorEndpointNotConnected, - ErrorAlreadyConnected - } - - private readonly long mLocalClientId; - private readonly string mRemoteEndpointId; - private readonly Status mResponseStatus; - private readonly byte[] mPayload; - - private ConnectionResponse(long localClientId, string remoteEndpointId, Status code, - byte[] payload) - { - this.mLocalClientId = localClientId; - this.mRemoteEndpointId = Misc.CheckNotNull(remoteEndpointId); - this.mResponseStatus = code; - this.mPayload = Misc.CheckNotNull(payload); - } - - public long LocalClientId - { - get { return mLocalClientId; } - } - - public string RemoteEndpointId - { - get { return mRemoteEndpointId; } - } - - public Status ResponseStatus - { - get { return mResponseStatus; } - } - - public byte[] Payload - { - get { return mPayload; } - } - - public static ConnectionResponse Rejected(long localClientId, string remoteEndpointId) - { - return new ConnectionResponse(localClientId, remoteEndpointId, Status.Rejected, - EmptyPayload); - } - - public static ConnectionResponse NetworkNotConnected(long localClientId, string remoteEndpointId) - { - return new ConnectionResponse(localClientId, remoteEndpointId, Status.ErrorNetworkNotConnected, - EmptyPayload); - } - - public static ConnectionResponse InternalError(long localClientId, string remoteEndpointId) - { - return new ConnectionResponse(localClientId, remoteEndpointId, Status.ErrorInternal, - EmptyPayload); - } - - public static ConnectionResponse EndpointNotConnected(long localClientId, string remoteEndpointId) - { - return new ConnectionResponse(localClientId, remoteEndpointId, Status.ErrorEndpointNotConnected, - EmptyPayload); - } - - public static ConnectionResponse Accepted(long localClientId, string remoteEndpointId, - byte[] payload) - { - return new ConnectionResponse(localClientId, remoteEndpointId, Status.Accepted, - payload); - } - - public static ConnectionResponse AlreadyConnected(long localClientId, - string remoteEndpointId) - { - return new ConnectionResponse(localClientId, remoteEndpointId, - Status.ErrorAlreadyConnected, - EmptyPayload); - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs.meta deleted file mode 100644 index 1f22253..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/ConnectionResponse.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: ad6611af8d0204d0d8922a327d3d9ec0 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs deleted file mode 100644 index af90358..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs +++ /dev/null @@ -1,121 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi.Nearby -{ - using UnityEngine; - - public class DummyNearbyConnectionClient : INearbyConnectionClient - { - public int MaxUnreliableMessagePayloadLength() - { - return NearbyConnectionConfiguration.MaxUnreliableMessagePayloadLength; - } - - public int MaxReliableMessagePayloadLength() - { - return NearbyConnectionConfiguration.MaxReliableMessagePayloadLength; - } - - public void SendReliable(System.Collections.Generic.List recipientEndpointIds, byte[] payload) - { - OurUtils.Logger.d("SendReliable called from dummy implementation"); - } - - public void SendUnreliable(System.Collections.Generic.List recipientEndpointIds, byte[] payload) - { - OurUtils.Logger.d("SendUnreliable called from dummy implementation"); - } - - public void StartAdvertising(string name, System.Collections.Generic.List appIdentifiers, - System.TimeSpan? advertisingDuration, System.Action resultCallback, - System.Action connectionRequestCallback) - { - AdvertisingResult obj = new AdvertisingResult(ResponseStatus.LicenseCheckFailed, string.Empty); - resultCallback.Invoke(obj); - } - - public void StopAdvertising() - { - OurUtils.Logger.d("StopAvertising in dummy implementation called"); - } - - public void SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, - System.Action responseCallback, IMessageListener listener) - { - OurUtils.Logger.d("SendConnectionRequest called from dummy implementation"); - - if (responseCallback != null) - { - ConnectionResponse obj = ConnectionResponse.Rejected(0, string.Empty); - responseCallback.Invoke(obj); - } - } - - public void AcceptConnectionRequest(string remoteEndpointId, byte[] payload, IMessageListener listener) - { - OurUtils.Logger.d("AcceptConnectionRequest in dummy implementation called"); - } - - public void StartDiscovery(string serviceId, System.TimeSpan? advertisingTimeout, IDiscoveryListener listener) - { - OurUtils.Logger.d("StartDiscovery in dummy implementation called"); - } - - public void StopDiscovery(string serviceId) - { - OurUtils.Logger.d("StopDiscovery in dummy implementation called"); - } - - public void RejectConnectionRequest(string requestingEndpointId) - { - OurUtils.Logger.d("RejectConnectionRequest in dummy implementation called"); - } - - public void DisconnectFromEndpoint(string remoteEndpointId) - { - OurUtils.Logger.d("DisconnectFromEndpoint in dummy implementation called"); - } - - public void StopAllConnections() - { - OurUtils.Logger.d("StopAllConnections in dummy implementation called"); - } - - public string LocalEndpointId() - { - return string.Empty; - } - - public string LocalDeviceId() - { - return "DummyDevice"; - } - - public string GetAppBundleId() - { - return "dummy.bundle.id"; - } - - public string GetServiceId() - { - return "dummy.service.id"; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs.meta deleted file mode 100644 index cfee748..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/DummyNearbyConnectionClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 9b3f34a2bba13428789d02b53fd89a47 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs deleted file mode 100644 index 84d5c5d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using GooglePlayGames.OurUtils; - - public struct EndpointDetails - { - private readonly string mEndpointId; - private readonly string mName; - private readonly string mServiceId; - - public EndpointDetails(string endpointId, string name, string serviceId) - { - this.mEndpointId = Misc.CheckNotNull(endpointId); - this.mName = Misc.CheckNotNull(name); - this.mServiceId = Misc.CheckNotNull(serviceId); - } - - public string EndpointId - { - get { return mEndpointId; } - } - - public string Name - { - get { return mName; } - } - - public string ServiceId - { - get { return mServiceId; } - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs.meta deleted file mode 100644 index 6dd55d9..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/EndpointDetails.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 9d9a087b0e20d4752b24f33a4a2bf977 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs deleted file mode 100644 index c25e519..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using System; - using System.Collections.Generic; - - // move this inside IMessageListener and IDiscoveryListener are always declared. -#if UNITY_ANDROID - - public interface INearbyConnectionClient - { - int MaxUnreliableMessagePayloadLength(); - - int MaxReliableMessagePayloadLength(); - - void SendReliable(List recipientEndpointIds, byte[] payload); - - void SendUnreliable(List recipientEndpointIds, byte[] payload); - - void StartAdvertising(string name, List appIdentifiers, - TimeSpan? advertisingDuration, Action resultCallback, - Action connectionRequestCallback); - - void StopAdvertising(); - - void SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, - Action responseCallback, IMessageListener listener); - - void AcceptConnectionRequest(string remoteEndpointId, byte[] payload, - IMessageListener listener); - - void StartDiscovery(string serviceId, TimeSpan? advertisingTimeout, - IDiscoveryListener listener); - - void StopDiscovery(string serviceId); - - void RejectConnectionRequest(string requestingEndpointId); - - void DisconnectFromEndpoint(string remoteEndpointId); - - void StopAllConnections(); - - string GetAppBundleId(); - - string GetServiceId(); - } -#endif - - public interface IMessageListener - { - void OnMessageReceived(string remoteEndpointId, byte[] data, - bool isReliableMessage); - - void OnRemoteEndpointDisconnected(string remoteEndpointId); - } - - public interface IDiscoveryListener - { - void OnEndpointFound(EndpointDetails discoveredEndpoint); - - void OnEndpointLost(string lostEndpointId); - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs.meta deleted file mode 100644 index e54bb65..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/INearbyConnectionClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: cb64b5b444dd34de5bd308c7eed6e509 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs deleted file mode 100644 index e789630..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.Nearby -{ - using System; - using GooglePlayGames.OurUtils; - - public enum InitializationStatus - { - Success, - VersionUpdateRequired, - InternalError - } - - public struct NearbyConnectionConfiguration - { - public const int MaxUnreliableMessagePayloadLength = 1168; - public const int MaxReliableMessagePayloadLength = 4096; - - private readonly Action mInitializationCallback; - private readonly long mLocalClientId; - - public NearbyConnectionConfiguration(Action callback, - long localClientId) - { - this.mInitializationCallback = Misc.CheckNotNull(callback); - this.mLocalClientId = localClientId; - } - - public long LocalClientId - { - get { return mLocalClientId; } - } - - public Action InitializationCallback - { - get { return mInitializationCallback; } - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs.meta deleted file mode 100644 index 2c54d2d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Nearby/NearbyConnectionConfiguration.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 968ac90e4a9094a4a92df9da1ee1f884 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs deleted file mode 100644 index 094645f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#if UNITY_ANDROID -namespace GooglePlayGames.BasicApi -{ - /// - /// Represents a player. A player is different from a participant! The participant is - /// an entity that takes part in a particular match; a Player is a real-world person - /// (tied to a Games account). The player exists across matches, the Participant - /// only exists in the context of a particular match. - /// - public class Player : PlayGamesUserProfile - { - internal Player(string displayName, string playerId, string avatarUrl) - : base(displayName, playerId, avatarUrl) - { - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs.meta deleted file mode 100644 index d338234..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/Player.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: a6dfb529ed3bfc58ea80e1e100af33fd -labels: -- gvh -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs deleted file mode 100644 index fae6b68..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - /// - /// Represents a player, a real-world person (tied to a Games account). - /// - public class PlayerProfile : PlayGamesUserProfile - { - internal PlayerProfile(string displayName, string playerId, string avatarUrl, bool isFriend) : base(displayName, - playerId, avatarUrl, isFriend) - { - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs.meta deleted file mode 100644 index 800ecfa..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerProfile.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 12cfec295ecf76a6fb0d0d48f59d374c -labels: -- gvh -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs deleted file mode 100644 index a7e8c5f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs +++ /dev/null @@ -1,268 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - using System; - - /// - /// Player stats. See https://developers.google.com/games/services/android/stats - /// - public class PlayerStats - { - private static float UNSET_VALUE = -1.0f; - - public PlayerStats( - int numberOfPurchases, - float avgSessionLength, - int daysSinceLastPlayed, - int numberOfSessions, - float sessPercentile, - float spendPercentile, - float spendProbability, - float churnProbability, - float highSpenderProbability, - float totalSpendNext28Days) - { - mValid = true; - mNumberOfPurchases = numberOfPurchases; - mAvgSessionLength = avgSessionLength; - mDaysSinceLastPlayed = daysSinceLastPlayed; - mNumberOfSessions = numberOfSessions; - mSessPercentile = sessPercentile; - mSpendPercentile = spendPercentile; - mSpendProbability = spendProbability; - mChurnProbability = churnProbability; - mHighSpenderProbability = highSpenderProbability; - mTotalSpendNext28Days = totalSpendNext28Days; - } - - public PlayerStats() - { - mValid = false; - } - - private bool mValid; - private int mNumberOfPurchases; - private float mAvgSessionLength; - private int mDaysSinceLastPlayed; - private int mNumberOfSessions; - private float mSessPercentile; - private float mSpendPercentile; - private float mSpendProbability; - private float mChurnProbability; - private float mHighSpenderProbability; - private float mTotalSpendNext28Days; - - /// - /// If this PlayerStats object is valid (i.e. successfully retrieved from games services). - /// - /// - /// Note that a PlayerStats with all stats unset may still be valid. - /// - public bool Valid - { - get { return mValid; } - } - - /// - /// The number of in-app purchases. - /// - public int NumberOfPurchases - { - get { return mNumberOfPurchases; } - } - - /// - /// The length of the avg session in minutes. - /// - public float AvgSessionLength - { - get { return mAvgSessionLength; } - } - - /// - /// The days since last played. - /// - public int DaysSinceLastPlayed - { - get { return mDaysSinceLastPlayed; } - } - - /// - /// The number of sessions based on sign-ins. - /// - public int NumberOfSessions - { - get { return mNumberOfSessions; } - } - - /// - /// The approximation of sessions percentile for the player. - /// - /// - /// This value is given as a decimal value between 0 and 1 (inclusive). - /// It indicates how many sessions the current player has - /// played in comparison to the rest of this game's player base. - /// Higher numbers indicate that this player has played more sessions. - /// A return value less than zero indicates this value is not available. - /// - public float SessPercentile - { - get { return mSessPercentile; } - } - - /// - /// The approximate spend percentile of the player. - /// - /// - /// This value is given as a decimal value between 0 and 1 (inclusive). - /// It indicates how much the current player has spent in - /// comparison to the rest of this game's player base. Higher - /// numbers indicate that this player has spent more. - /// A return value less than zero indicates this value is not available. - /// - public float SpendPercentile - { - get { return mSpendPercentile; } - } - - /// - /// The approximate probability of the player choosing to spend in this game. - /// - /// - /// This value is given as a decimal value between 0 and 1 (inclusive). - /// Higher values indicate that a player is more likely to spend. - /// A return value less than zero indicates this value is not available. - /// - public float SpendProbability - { - get { return mSpendProbability; } - } - - /// - /// The approximate probability of the player not returning to play the game. - /// - /// - /// Higher values indicate that a player is less likely to return. - /// A return value less than zero indicates this value is not available. - /// - public float ChurnProbability - { - get { return mChurnProbability; } - } - - /// - /// The high spender probability of this player. - /// - public float HighSpenderProbability - { - get { return mHighSpenderProbability; } - } - - /// - /// The predicted total spend of this player over the next 28 days. - /// - public float TotalSpendNext28Days - { - get { return mTotalSpendNext28Days; } - } - - /// - /// Determines whether this instance has NumberOfPurchases. - /// - /// true if this instance has NumberOfPurchases; otherwise, false. - public bool HasNumberOfPurchases() - { - return NumberOfPurchases != (int) UNSET_VALUE; - } - - /// - /// Determines whether this instance has AvgSessionLength. - /// - /// true if this instance has AvgSessionLength; otherwise, false. - public bool HasAvgSessionLength() - { - return AvgSessionLength != UNSET_VALUE; - } - - /// - /// Determines whether this instance has DaysSinceLastPlayed. - /// - /// true if this instance has DaysSinceLastPlayed; otherwise, false. - public bool HasDaysSinceLastPlayed() - { - return DaysSinceLastPlayed != (int) UNSET_VALUE; - } - - /// - /// Determines whether this instance has NumberOfSessions. - /// - /// true if this instance has NumberOfSessions; otherwise, false. - public bool HasNumberOfSessions() - { - return NumberOfSessions != (int) UNSET_VALUE; - } - - /// - /// Determines whether this instance has SessPercentile. - /// - /// true if this instance has SessPercentile; otherwise, false. - public bool HasSessPercentile() - { - return SessPercentile != UNSET_VALUE; - } - - /// - /// Determines whether this instance has SpendPercentile. - /// - /// true if this instance has SpendPercentile; otherwise, false. - public bool HasSpendPercentile() - { - return SpendPercentile != UNSET_VALUE; - } - - /// - /// Determines whether this instance has ChurnProbability. - /// - /// true if this instance has ChurnProbability; otherwise, false. - public bool HasChurnProbability() - { - return ChurnProbability != UNSET_VALUE; - } - - /// - /// Determines whether this instance has HighSpenderProbability. - /// - /// true if this instance has HighSpenderProbability; otherwise, false. - public bool HasHighSpenderProbability() - { - return HighSpenderProbability != UNSET_VALUE; - } - - /// - /// Determines whether this instance has TotalSpendNext28Days. - /// - /// true if this instance has TotalSpendNext28Days; otherwise, false. - public bool HasTotalSpendNext28Days() - { - return TotalSpendNext28Days != UNSET_VALUE; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs.meta deleted file mode 100644 index f39fae4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/PlayerStats.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 0cf73f44d6d524deab1717d6e71e2c6d -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame.meta deleted file mode 100644 index 599cdc6..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1bc47bd5631b849f88f2785c2d44019b -folderAsset: yes -timeCreated: 1435699548 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs deleted file mode 100644 index f7391a6..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs +++ /dev/null @@ -1,373 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.SavedGame -{ - using System; - using System.Collections.Generic; - - /// - /// An enum for the different strategies that can be used to resolve saved game conflicts (i.e. - /// conflicts produced by two or more separate writes to the same saved game at once). - /// - public enum ConflictResolutionStrategy - { - /// - /// Choose which saved game should be used on the basis of which one has the longest recorded - /// play time. In other words, in the case of a conflicting write, the saved game with the - /// longest play time will be considered cannonical. If play time has not been provided by the - /// developer, or in the case of two saved games with equal play times, - /// will be used instead. - /// - UseLongestPlaytime, - - /// - /// Choose the version of the saved game that existed before any conflicting write occurred. - /// Consider the following case: - /// - An initial version of a save game ("X") is written from a device ("Dev_A") - /// - The save game X is downloaded by another device ("Dev_B"). - /// - Dev_A writes a new version of the save game to the cloud ("Y") - /// - Dev_B does not see the new save game Y, and attempts to write a new save game ("Z"). - /// - Since Dev_B is performing a write using out of date information, a conflict is generated. - /// - /// In this situation, we can resolve the conflict by declaring either keeping Y as the - /// canonical version of the saved game (i.e. choose "original" aka ), - /// or by overwriting it with conflicting value, Z (i.e. choose "unmerged" aka - /// ). - /// - /// - UseOriginal, - - /// - /// See the documentation for - /// - UseUnmerged, - - /// - /// Manual resolution, no automatic resolution is attempted. - /// - UseManual, - - /// - /// The use last known good snapshot to resolve conflicts automatically. - /// - UseLastKnownGood, - - /// - /// The use most recently saved snapshot to resolve conflicts automatically. - /// - UseMostRecentlySaved - } - - public enum SavedGameRequestStatus - { - Success = 1, - - /// - /// The request failed due to a timeout. - /// - /// - TimeoutError = -1, - - /// - /// An unexpected internal error. Check the log for error messages. - /// - /// - InternalError = -2, - - /// - /// A error related to authentication. This is probably due to the user being signed out - /// before the request could be issued. - /// - /// - AuthenticationError = -3, - - /// - /// The request failed because it was given bad input (e.g. a filename with 200 characters). - /// - /// - BadInputError = -4 - } - - public enum SelectUIStatus - { - /// - /// The user selected a saved game. - /// - SavedGameSelected = 1, - - /// - /// The user closed the UI without selecting a saved game. - /// - /// - UserClosedUI = 2, - - /// - /// An unexpected internal error. Check the log for error messages. - /// - /// - InternalError = -1, - - /// - /// There was a timeout while displaying the UI. - /// - /// - TimeoutError = -2, - - /// - /// A error related to authentication. This is probably due to the user being signed out - /// before the request could be issued. - /// - /// - AuthenticationError = -3, - - /// - /// The request failed because it was given bad input (e.g. a filename with 200 characters). - /// - /// - BadInputError = -4, - - UiBusy = -5 - } - - /// - /// - /// A delegate that is invoked when we encounter a conflict during execution of - /// . The caller must resolve the - /// conflict using the passed . All passed metadata is open. - /// If was invoked with - /// prefetchDataOnConflict set to true, the and - /// will be equal to the binary data of the "original" and - /// "unmerged" saved game respectively (and null otherwise). Since conflict files may be generated - /// by other clients, it is possible that neither of the passed saved games were originally written - /// by the current device. Consequently, any conflict resolution strategy should not rely on local - /// data that is not part of the binary data of the passed saved games - this data will not be - /// present if conflict resolution occurs on a different device. In addition, since a given saved - /// game may have multiple conflicts, this callback must be designed to handle multiple invocations. - /// - public delegate void ConflictCallback(IConflictResolver resolver, ISavedGameMetadata original, - byte[] originalData, ISavedGameMetadata unmerged, byte[] unmergedData); - - /// - /// The main entry point for interacting with saved games. Saved games are persisted in the cloud - /// along with several game-specific properties ( for more - /// information). There are several core concepts involved with saved games: - /// - /// Filenames - act as unique identifiers for saved games. Two devices - /// performing a read or write using the same filename will end up reading or modifying the same - /// file (i.e. filenames are not device specific). - /// - /// - /// Saved Game Metadata are represented by . - /// The instances allow access to metadata properties about the underlying saved game (e.g. - /// description). In addition, metadata functions as a handle that are required to read and - /// manipulate saved game contents. Lastly, metadata may be "Open". Open metadata instances are - /// required to manipulate the underlying binary data of the saved game. See method comments to - /// determine whether a specific method requires or returns an open saved game. - /// - /// - /// Conflicts occur when multiple devices attempt to write to the same file - /// at the same time. The saved game system guarantees that no conflicting writes will be lost or - /// silently overwritten. Instead, they must be handled the next time the file with a conflict is - /// Opened. Conflicts can be handled automatically ( - /// ) or can be manuallyhandled by the developer - /// (). See the Open methods for more discussion. - /// - /// - /// Saved games will generally be used in the following workflow: - /// - /// Determine which saved game to use (either using a hardcoded filename or - /// ShowSelectSavedGameUI) - /// Open the file using OpenWithManualConflictResolution or - /// OpenWithAutomaticConflictResolution - /// Read the binary data of the saved game using ReadBinaryData handle it - /// as appropriate for your game. - /// When you have updates, persist them in the cloud using CommitUpdate. Note - /// that writing to the cloud is relatively expensive, and shouldn't be done frequently. - /// - /// - /// - /// See online - /// documentation for Saved Games for more information. - /// - public interface ISavedGameClient - { - /// - /// Opens the file with the indicated name and data source. If the file has an outstanding - /// conflict, it will be resolved using the specified conflict resolution strategy. The - /// metadata returned by this method will be "Open" - it can be used as a parameter for - /// and . - /// - /// The name of the file to open. Filenames must consist of - /// only non-URL reserved characters (i.e. a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~") - /// be between 1 and 100 characters in length (inclusive). - /// The data source to use. for a description - /// of the available options here. - /// The conflict resolution that should be used if any - /// conflicts are encountered while opening the file. - /// for a description of these strategies. - /// The callback that is invoked when this operation finishes. The - /// returned metadata will only be non-null if the open succeeded. This callback will always - /// execute on the game thread and the returned metadata (if any) will be "Open". - void OpenWithAutomaticConflictResolution(string filename, DataSource source, - ConflictResolutionStrategy resolutionStrategy, - Action callback); - - /// - /// Opens the file with the indicated name and data source. If there is a conflict that - /// requires resolution, it will be resolved manually using the passed conflict callback. Once - /// all pending conflicts are resolved, the completed callback will be invoked with the - /// retrieved data. In the event of an error, the completed callback will be invoked with the - /// corresponding error status. All callbacks will be executed on the game thread. - /// - /// The name of the file to open. Filenames must consist of - /// only non-URL reserved characters (i.e. a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~") - /// be between 1 and 100 characters in length (inclusive). - /// The data source to use. for a description - /// of the available options here. - /// If set to true, the data for the two - /// conflicting files will be automatically retrieved and passed as parameters in - /// . If set to false, null binary data - /// will be passed into and the caller will have to fetch - /// it themselves. - /// The callback that will be invoked if one or more conflict is - /// encountered while executing this method. Note that more than one conflict may be present - /// and that this callback might be executed more than once to resolve multiple conflicts. - /// This callback is always executed on the game thread. - /// The callback that is invoked when this operation finishes. - /// The returned metadata will only be non-null if the open succeeded. If an error is - /// encountered during conflict resolution, that error will be reflected here. This callback - /// will always execute on the game thread and the returned metadata (if any) will be "Open". - /// - void OpenWithManualConflictResolution(string filename, DataSource source, - bool prefetchDataOnConflict, ConflictCallback conflictCallback, - Action completedCallback); - - /// - /// Reads the binary data of the passed saved game. The passed metadata must be opened (i.e. - /// returns true). The callback will always be executed - /// on the game thread. - /// - /// The metadata for the saved game whose binary data we want to read. - /// This metadata must be open. If it is not open, the method will immediately fail with status - /// . - /// - /// The callback that is invoked when the read finishes. If the - /// read completed without error, the passed status will be and the passed - /// bytes will correspond to the binary data for the file. In the case of - /// - void ReadBinaryData(ISavedGameMetadata metadata, - Action completedCallback); - - /// - /// Shows the select saved game UI with the indicated configuration. If the user selects a - /// saved game in that UI, it will be returned in the passed callback. This metadata will be - /// unopened and must be passed to either or - /// in order to retrieve the binary data. - /// The callback will always be executed on the game thread. - /// - /// The user-visible title of the displayed selection UI. - /// The maximum number of saved games the UI may display. - /// This value must be greater than 0. - /// If set to true, show UI that will allow the user to - /// create a new saved game. - /// If set to true show UI that will allow the user to - /// delete a saved game. - /// The callback that is invoked when an error occurs or if the user - /// finishes interacting with the UI. If the user selected a saved game, this will be passed - /// into the callback along with the status. This saved game - /// will not be Open, and must be opened before it can be written to or its binary data can be - /// read. If the user backs out of the UI without selecting a saved game, this callback will - /// receive and a null saved game. This callback will always execute - /// on the game thread. - void ShowSelectSavedGameUI(string uiTitle, uint maxDisplayedSavedGames, bool showCreateSaveUI, - bool showDeleteSaveUI, Action callback); - - /// - /// Durably commits an update to the passed saved game. When this method returns successfully, - /// the data is durably persisted to disk and will eventually be uploaded to the cloud (in - /// practice, this will happen very quickly unless the device does not have a network - /// connection). If an update to the saved game has occurred after the metadata was retrieved - /// from the cloud, this update will produce a conflict (this commonly occurs if two different - /// devices are writing to the cloud at the same time). All conflicts must be handled the next - /// time this saved game is opened. See and - /// for more information. - /// - /// The metadata for the saved game to update. This metadata must be - /// Open (i.e. returns true)."/> If it is not open, the - /// method will immediately fail with status - /// All updates that should be applied to the saved game - /// metadata. - /// The new binary content of the saved game - /// The callback that is invoked when this operation finishes. - /// The returned metadata will only be non-null if the commit succeeded. If an error is - /// encountered during conflict resolution, that error will be reflected here. This callback - /// will always execute on the game thread and the returned metadata (if any) will NOT be - /// "Open" (i.e. commiting an update closes the metadata). - void CommitUpdate(ISavedGameMetadata metadata, SavedGameMetadataUpdate updateForMetadata, - byte[] updatedBinaryData, Action callback); - - /// - /// Returns the metadata for all known saved games for this game. All returned saved games are - /// not open, and must be opened before they can be used for writes or binary data reads. The - /// callback will always occur on the game thread. - /// - /// The data source to use. for a description - /// of the available options here. - /// The callback that is invoked when this operation finishes. - /// The returned metadata will only be non-empty if the commit succeeded. If an error is - /// encountered during the fetch, that error will be reflected here. This callback - /// will always execute on the game thread and the returned metadata (if any) will NOT be - /// "Open". - void FetchAllSavedGames(DataSource source, - Action> callback); - - /// - /// Delete the specified snapshot. - /// This will delete the data of the snapshot locally and on the server. - /// - /// the saved game metadata identifying the data to - /// delete. - void Delete(ISavedGameMetadata metadata); - } - - /// - /// An interface that allows developers to resolve metadata conflicts that may be encountered while - /// opening saved games. - /// - public interface IConflictResolver - { - /// - /// Resolves the conflict by choosing the passed metadata to be canonical. The passed metadata - /// must be one of the two instances passed as parameters into - - /// this instance will be kept as the cannonical value in the cloud. - /// - /// The chosen metadata. This metadata must be open. If it is not - /// open, the invokation of that produced this - /// ConflictResolver will immediately fail with . - void ChooseMetadata(ISavedGameMetadata chosenMetadata); - - /// - /// Resolves the conflict and updates the data. - /// - /// Metadata for the chosen version. This is either the - /// original or unmerged metadata provided when the callback is invoked. - /// Metadata update, same as when committing changes. - /// Updated data to use when resolving the conflict. - void ResolveConflict(ISavedGameMetadata chosenMetadata, SavedGameMetadataUpdate metadataUpdate, - byte[] updatedData); - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs.meta deleted file mode 100644 index 9d9606b..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 5d4ff89980bdd4c9780aa3ceee54a51b -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs deleted file mode 100644 index 7b80eac..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.SavedGame -{ - using System; - - /// - /// Interface representing the metadata for a saved game. These instances are also used as handles - /// for reading and writing the content of the underlying file. - /// - public interface ISavedGameMetadata - { - /// - /// Returns true if this metadata can be used for operations related to raw file data (i.e. - /// the binary data contained in the underlying file). Metadata returned by Open operations - /// will be "Open". After an update to the file is committed or the metadata is used to resolve - /// a conflict, the corresponding Metadata is closed, and IsOpen will return false. - /// - /// - /// true if this instance is open; otherwise, false. - bool IsOpen { get; } - - /// - /// Returns the filename for this saved game. A saved game filename will only consist of - /// non-URL reserved characters (i.e. a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~") - /// and will between 1 and 100 characters in length (inclusive). - /// - /// The filename. - string Filename { get; } - - /// - /// Returns a human-readable description of what the saved game contains. This may be null. - /// - /// The description. - string Description { get; } - - /// - /// A URL corresponding to the PNG-encoded image corresponding to this saved game. null if - /// the saved game does not have a cover image. - /// - /// The cover image URL. - string CoverImageURL { get; } - - /// - /// Returns the total time played by the player for this saved game. This value is - /// developer-specified and may be tracked in any way that is appropriate to the game. Note - /// that this value is specific to this specific saved game (unless the developer intentionally - /// sets the same value on all saved games). If the value was not set, this will be equal to - /// TimeSpan.FromMilliseconds(0) - /// - /// The total time played. - TimeSpan TotalTimePlayed { get; } - - /// - /// A timestamp corresponding to the last modification to the underlying saved game. If the - /// saved game is newly created, this value will correspond to the time the first Open - /// occurred. Otherwise, this corresponds to time the last successful write occurred (either by - /// CommitUpdate or Resolve methods). - /// - /// The last modified timestamp. - DateTime LastModifiedTimestamp { get; } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs.meta deleted file mode 100644 index 1c141d2..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/ISavedGameMetadata.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: a94650f478358403ea166d374b2a950c -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs deleted file mode 100644 index 7d84a84..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.BasicApi.SavedGame -{ - using System; - using GooglePlayGames.OurUtils; - - /// - /// A struct representing the mutation of saved game metadata. Fields can either have a new value - /// or be untouched (in which case the corresponding field in the saved game metadata will be - /// untouched). Instances must be built using - /// and once created, these instances are immutable and threadsafe. - /// - public struct SavedGameMetadataUpdate - { - private readonly bool mDescriptionUpdated; - private readonly string mNewDescription; - private readonly bool mCoverImageUpdated; - private readonly byte[] mNewPngCoverImage; - private readonly TimeSpan? mNewPlayedTime; - - private SavedGameMetadataUpdate(Builder builder) - { - mDescriptionUpdated = builder.mDescriptionUpdated; - mNewDescription = builder.mNewDescription; - mCoverImageUpdated = builder.mCoverImageUpdated; - mNewPngCoverImage = builder.mNewPngCoverImage; - mNewPlayedTime = builder.mNewPlayedTime; - } - - public bool IsDescriptionUpdated - { - get { return mDescriptionUpdated; } - } - - public string UpdatedDescription - { - get { return mNewDescription; } - } - - public bool IsCoverImageUpdated - { - get { return mCoverImageUpdated; } - } - - public byte[] UpdatedPngCoverImage - { - get { return mNewPngCoverImage; } - } - - public bool IsPlayedTimeUpdated - { - get { return mNewPlayedTime.HasValue; } - } - - public TimeSpan? UpdatedPlayedTime - { - get { return mNewPlayedTime; } - } - - public struct Builder - { - internal bool mDescriptionUpdated; - internal string mNewDescription; - internal bool mCoverImageUpdated; - internal byte[] mNewPngCoverImage; - internal TimeSpan? mNewPlayedTime; - - public Builder WithUpdatedDescription(string description) - { - mNewDescription = Misc.CheckNotNull(description); - mDescriptionUpdated = true; - return this; - } - - public Builder WithUpdatedPngCoverImage(byte[] newPngCoverImage) - { - mCoverImageUpdated = true; - mNewPngCoverImage = newPngCoverImage; - return this; - } - - public Builder WithUpdatedPlayedTime(TimeSpan newPlayedTime) - { - if (newPlayedTime.TotalMilliseconds > ulong.MaxValue) - { - throw new InvalidOperationException("Timespans longer than ulong.MaxValue " + - "milliseconds are not allowed"); - } - - mNewPlayedTime = newPlayedTime; - return this; - } - - public SavedGameMetadataUpdate Build() - { - return new SavedGameMetadataUpdate(this); - } - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs.meta deleted file mode 100644 index 631b9b5..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SavedGame/SavedGameMetadataUpdate.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 602d9e1c90f0144e79536115f3614478 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs deleted file mode 100644 index b4ab076..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames.BasicApi -{ - public enum ScorePageDirection - { - Forward = 1, - Backward = 2, - } - - /// - /// Score page token. This holds the internal token used - /// to page through the score pages. The id, collection, and - /// timespan are added as a convience, and not actually part of the - /// page token returned from the SDK. - /// - public class ScorePageToken - { - private string mId; - private object mInternalObject; - private LeaderboardCollection mCollection; - private LeaderboardTimeSpan mTimespan; - private ScorePageDirection mDirection; - - internal ScorePageToken(object internalObject, string id, - LeaderboardCollection collection, LeaderboardTimeSpan timespan, - ScorePageDirection direction) - { - mInternalObject = internalObject; - mId = id; - mCollection = collection; - mTimespan = timespan; - mDirection = direction; - } - - public LeaderboardCollection Collection - { - get { return mCollection; } - } - - public LeaderboardTimeSpan TimeSpan - { - get { return mTimespan; } - } - - public ScorePageDirection Direction - { - get { return mDirection; } - } - - public string LeaderboardId - { - get { return mId; } - } - - internal object InternalObject - { - get { return mInternalObject; } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs.meta deleted file mode 100644 index 9f270dd..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/ScorePageToken.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 3eade9d49f3e341ddb2ba8209e7ddf42 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs deleted file mode 100644 index d6d48e2..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace GooglePlayGames.BasicApi -{ - public enum SignInInteractivity - { - /// no UIs will be shown (if UIs are needed, it will fail rather than show them). - NoPrompt, - - /// - /// This may show UIs, consent dialogs, etc. - /// At the end of the process, callback will be invoked to notify of the result. - /// Once the callback returns true, the user is considered to be authenticated. - /// - CanPromptAlways, - - /// When this is selected, PlayGamesPlatform.Authenticate does the followings in order: - /// 1. Attempt to silent sign in. - /// 2. If silent sign in fails, check if user has previously declined to sign in and don’t prompt interactive - /// sign in if they have. - /// 3. Check the internet connection and fail with NO_INTERNET_CONNECTION if there is no internet connection. - /// 4. Prompt interactive sign in. - /// 5. If the interactive sign in is not successful (user declines or cancels), then - /// remember this for step 2 the next time the user opens the game and don’t ask for sign-in. - /// - CanPromptOnce - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs.meta deleted file mode 100644 index c0a5467..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInInteractivity.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: f5c7733064f2b09dc8df0009b3bbb1d6 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs deleted file mode 100644 index 159f49b..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace GooglePlayGames.BasicApi -{ - public enum SignInStatus - { - /// The operation was successful. - Success, - - /// An internal error occurred. - InternalError, - - /// The sign in was canceled. - Canceled, - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs.meta deleted file mode 100644 index ab20fbf..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/SignInStatus.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 0992bc2597d741e59dc3f8c963a3ca25 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs deleted file mode 100644 index a3e33f4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#if UNITY_ANDROID - -namespace GooglePlayGames { - /// - /// This file is automatically generated DO NOT EDIT! - /// - /// These are the constants defined in the Play Games Console for Game Services - /// Resources. - /// - /// - /// File containing information about the game. This is automatically updated by running the - /// platform-appropriate setup commands in the Unity editor (which does a simple search / replace - /// on the IDs in the form "__ID__"). We can check whether any particular field has been updated - /// by checking whether it still retains its initial value - we prevent the constants from being - /// replaced in the aforementioned search/replace by stripping off the leading and trailing "__". - /// - public static class GameInfo { - - private const string UnescapedApplicationId = "APP_ID"; - private const string UnescapedIosClientId = "IOS_CLIENTID"; - private const string UnescapedWebClientId = "WEB_CLIENTID"; - private const string UnescapedNearbyServiceId = "NEARBY_SERVICE_ID"; - - public const string ApplicationId = "1045293753265"; // Filled in automatically - public const string IosClientId = "__IOS_CLIENTID__"; // Filled in automatically - public const string WebClientId = ""; // Filled in automatically - public const string NearbyConnectionServiceId = ""; - - public static bool ApplicationIdInitialized() { - return !string.IsNullOrEmpty(ApplicationId) && !ApplicationId.Equals(ToEscapedToken(UnescapedApplicationId)); - } - - public static bool IosClientIdInitialized() { - return !string.IsNullOrEmpty(IosClientId) && !IosClientId.Equals(ToEscapedToken(UnescapedIosClientId)); - } - - public static bool WebClientIdInitialized() { - return !string.IsNullOrEmpty(WebClientId) && !WebClientId.Equals(ToEscapedToken(UnescapedWebClientId)); - } - - public static bool NearbyConnectionsInitialized() { - return !string.IsNullOrEmpty(NearbyConnectionServiceId) && - !NearbyConnectionServiceId.Equals(ToEscapedToken(UnescapedNearbyServiceId)); - } - - /// - /// Returns an escaped token (i.e. one flanked with "__") for the passed token - /// - /// The escaped token. - /// The Token - private static string ToEscapedToken(string token) { - return string.Format("__{0}__", token); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs.meta deleted file mode 100644 index c814181..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: a722d413080904cc1bd07f4db21e1af1 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform.meta deleted file mode 100644 index b7673b5..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ef66268ee929544fb82bbef6ac13bafe -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs deleted file mode 100644 index 278535d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs +++ /dev/null @@ -1,286 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System; - using GooglePlayGames.BasicApi; - using UnityEngine; -#if UNITY_2017_1_OR_NEWER - using UnityEngine.Networking; -#endif - using UnityEngine.SocialPlatforms; - - internal delegate void ReportProgress(string id, double progress, Action callback); - - /// - /// Represents a Google Play Games achievement. It can be used to report an achievement - /// to the API, offering identical functionality as . - /// - internal class PlayGamesAchievement : IAchievement, IAchievementDescription - { - private readonly ReportProgress mProgressCallback; - private string mId = string.Empty; - private bool mIsIncremental = false; - private int mCurrentSteps = 0; - private int mTotalSteps = 0; - private double mPercentComplete = 0.0; - private bool mCompleted = false; - private bool mHidden = false; - private DateTime mLastModifiedTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); - private string mTitle = string.Empty; - private string mRevealedImageUrl = string.Empty; - private string mUnlockedImageUrl = string.Empty; -#if UNITY_2017_1_OR_NEWER - private UnityWebRequest mImageFetcher = null; -#else - private WWW mImageFetcher = null; -#endif - private Texture2D mImage = null; - private string mDescription = string.Empty; - private ulong mPoints = 0; - - internal PlayGamesAchievement() - : this(PlayGamesPlatform.Instance.ReportProgress) - { - } - - internal PlayGamesAchievement(ReportProgress progressCallback) - { - mProgressCallback = progressCallback; - } - - internal PlayGamesAchievement(Achievement ach) : this() - { - this.mId = ach.Id; - this.mIsIncremental = ach.IsIncremental; - this.mCurrentSteps = ach.CurrentSteps; - this.mTotalSteps = ach.TotalSteps; - if (ach.IsIncremental) - { - if (ach.TotalSteps > 0) - { - this.mPercentComplete = - ((double) ach.CurrentSteps / (double) ach.TotalSteps) * 100.0; - } - else - { - this.mPercentComplete = 0.0; - } - } - else - { - this.mPercentComplete = ach.IsUnlocked ? 100.0 : 0.0; - } - - this.mCompleted = ach.IsUnlocked; - this.mHidden = !ach.IsRevealed; - this.mLastModifiedTime = ach.LastModifiedTime; - this.mTitle = ach.Name; - this.mDescription = ach.Description; - this.mPoints = ach.Points; - this.mRevealedImageUrl = ach.RevealedImageUrl; - this.mUnlockedImageUrl = ach.UnlockedImageUrl; - } - - /// - /// Reveals, unlocks or increment achievement. - /// - /// - /// Call after setting , , - /// as well as and - /// for incremental achievements. Equivalent to calling - /// . - /// - public void ReportProgress(Action callback) - { - mProgressCallback.Invoke(mId, mPercentComplete, callback); - } - - /// - /// Loads the local user's image from the url. Loading urls - /// is asynchronous so the return from this call is fast, - /// the image is returned once it is loaded. null is returned - /// up to that point. - /// - private Texture2D LoadImage() - { - if (hidden) - { - // return null, we dont have images for hidden achievements. - return null; - } - - string url = completed ? mUnlockedImageUrl : mRevealedImageUrl; - - // the url can be null if the image is not configured. - if (!string.IsNullOrEmpty(url)) - { - if (mImageFetcher == null || mImageFetcher.url != url) - { -#if UNITY_2017_1_OR_NEWER - mImageFetcher = UnityWebRequestTexture.GetTexture(url); -#else - mImageFetcher = new WWW(url); -#endif - mImage = null; - } - - // if we have the texture, just return, this avoids excessive - // memory usage calling www.texture repeatedly. - if (mImage != null) - { - return mImage; - } - - if (mImageFetcher.isDone) - { -#if UNITY_2017_1_OR_NEWER - mImage = DownloadHandlerTexture.GetContent(mImageFetcher); -#else - mImage = mImageFetcher.texture; -#endif - return mImage; - } - } - - // if there is no url, always return null. - return null; - } - - - /// - /// Gets or sets the id of this achievement. - /// - /// - /// The identifier. - /// - public string id - { - get { return mId; } - - set { mId = value; } - } - - /// - /// Gets a value indicating whether this achievement is incremental. - /// - /// - /// This value is only set by PlayGamesPlatform.LoadAchievements - /// - /// true if incremental; otherwise, false. - public bool isIncremental - { - get { return mIsIncremental; } - } - - /// - /// Gets the current steps completed of this achievement. - /// - /// - /// Undefined for standard (i.e. non-incremental) achievements. - /// This value is only set by PlayGamesPlatform.LoadAchievements, changing the - /// percentComplete will not affect this. - /// - /// The current steps. - public int currentSteps - { - get { return mCurrentSteps; } - } - - /// - /// Gets the total steps of this achievement. - /// - /// - /// Undefined for standard (i.e. non-incremental) achievements. - /// This value is only set by PlayGamesPlatform.LoadAchievements, changing the - /// percentComplete will not affect this. - /// - /// The total steps. - public int totalSteps - { - get { return mTotalSteps; } - } - - /// - /// Gets or sets the percent completed. - /// - /// - /// The percent completed. - /// - public double percentCompleted - { - get { return mPercentComplete; } - - set { mPercentComplete = value; } - } - - /// - /// Gets a value indicating whether this achievement is completed. - /// - /// - /// This value is only set by PlayGamesPlatform.LoadAchievements, changing the - /// percentComplete will not affect this. - /// - /// true if completed; otherwise, false. - public bool completed - { - get { return this.mCompleted; } - } - - /// - /// Gets a value indicating whether this achievement is hidden. - /// - /// true if hidden; otherwise, false. - public bool hidden - { - get { return this.mHidden; } - } - - public DateTime lastReportedDate - { - get { return mLastModifiedTime; } - } - - public String title - { - get { return mTitle; } - } - - public Texture2D image - { - get { return LoadImage(); } - } - - public string achievedDescription - { - get { return mDescription; } - } - - public string unachievedDescription - { - get { return mDescription; } - } - - public int points - { - get { return (int) mPoints; } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs.meta deleted file mode 100644 index f9ae214..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesAchievement.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: e5354c32a5dc64372ba5102f7f787adf -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs deleted file mode 100644 index 7659217..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System.Collections.Generic; - using GooglePlayGames.BasicApi; - using UnityEngine; - using UnityEngine.SocialPlatforms; - - public class PlayGamesLeaderboard : ILeaderboard - { - private string mId; - private UserScope mUserScope; - private Range mRange; - private TimeScope mTimeScope; - private string[] mFilteredUserIds; - private bool mLoading; - - private IScore mLocalUserScore; - private uint mMaxRange; - private List mScoreList = new List(); - private string mTitle; - - public PlayGamesLeaderboard(string id) - { - mId = id; - } - - #region ILeaderboard implementation - - public void SetUserFilter(string[] userIDs) - { - mFilteredUserIds = userIDs; - } - - public void LoadScores(System.Action callback) - { - PlayGamesPlatform.Instance.LoadScores(this, callback); - } - - public bool loading - { - get { return mLoading; } - internal set { mLoading = value; } - } - - public string id - { - get { return mId; } - set { mId = value; } - } - - public UserScope userScope - { - get { return mUserScope; } - set { mUserScope = value; } - } - - public Range range - { - get { return mRange; } - set { mRange = value; } - } - - public TimeScope timeScope - { - get { return mTimeScope; } - set { mTimeScope = value; } - } - - public IScore localUserScore - { - get { return mLocalUserScore; } - } - - public uint maxRange - { - get { return mMaxRange; } - } - - public IScore[] scores - { - get - { - PlayGamesScore[] arr = new PlayGamesScore[mScoreList.Count]; - mScoreList.CopyTo(arr); - return arr; - } - } - - public string title - { - get { return mTitle; } - } - - #endregion - - internal bool SetFromData(LeaderboardScoreData data) - { - if (data.Valid) - { - OurUtils.Logger.d("Setting leaderboard from: " + data); - SetMaxRange(data.ApproximateCount); - SetTitle(data.Title); - SetLocalUserScore((PlayGamesScore) data.PlayerScore); - foreach (IScore score in data.Scores) - { - AddScore((PlayGamesScore) score); - } - - mLoading = data.Scores.Length == 0 || HasAllScores(); - } - - return data.Valid; - } - - internal void SetMaxRange(ulong val) - { - mMaxRange = (uint) val; - } - - internal void SetTitle(string value) - { - mTitle = value; - } - - internal void SetLocalUserScore(PlayGamesScore score) - { - mLocalUserScore = score; - } - - internal int AddScore(PlayGamesScore score) - { - if (mFilteredUserIds == null || mFilteredUserIds.Length == 0) - { - mScoreList.Add(score); - } - else - { - foreach (string fid in mFilteredUserIds) - { - if (fid.Equals(score.userID)) - { - mScoreList.Add(score); - break; - } - } - } - - return mScoreList.Count; - } - - public int ScoreCount - { - get { return mScoreList.Count; } - } - - internal bool HasAllScores() - { - return mScoreList.Count >= mRange.count || mScoreList.Count >= maxRange; - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs.meta deleted file mode 100644 index 4d18c03..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLeaderboard.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: a027e4767bd0f41509b9ef6bd2f6080e -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs deleted file mode 100644 index 1a76760..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs +++ /dev/null @@ -1,207 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System; - using GooglePlayGames.BasicApi; - using UnityEngine.SocialPlatforms; - - /// - /// Represents the Google Play Games local user. - /// - public class PlayGamesLocalUser : PlayGamesUserProfile, ILocalUser - { - internal PlayGamesPlatform mPlatform; - - private PlayerStats mStats; - - internal PlayGamesLocalUser(PlayGamesPlatform plaf) - : base("localUser", string.Empty, string.Empty) - { - mPlatform = plaf; - mStats = null; - } - - /// - /// Authenticates the local user. Equivalent to calling - /// . - /// - public void Authenticate(Action callback) - { - mPlatform.Authenticate(status => callback(status == SignInStatus.Success)); - } - - /// - /// Authenticates the local user. Equivalent to calling - /// . - /// - public void Authenticate(Action callback) - { - mPlatform.Authenticate(status => callback(status == SignInStatus.Success, status.ToString())); - } - - /// - /// Loads all friends of the authenticated user. - /// - public void LoadFriends(Action callback) - { - mPlatform.LoadFriends(this, callback); - } - - /// - /// Synchronous version of friends, returns null until loaded. - /// - public IUserProfile[] friends - { - get { return mPlatform.GetFriends(); } - } - - /// - /// Returns whether or not the local user is authenticated to Google Play Games. - /// - /// - /// true if authenticated; otherwise, false. - /// - public bool authenticated - { - get { return mPlatform.IsAuthenticated(); } - } - - /// - /// Not implemented. As safety placeholder, returns true. - /// - public bool underage - { - get { return true; } - } - - /// - /// Gets the display name of the user. - /// - /// - /// The display name of the user. - /// - public new string userName - { - get - { - string retval = string.Empty; - if (authenticated) - { - retval = mPlatform.GetUserDisplayName(); - if (!base.userName.Equals(retval)) - { - ResetIdentity(retval, mPlatform.GetUserId(), mPlatform.GetUserImageUrl()); - } - } - - return retval; - } - } - - /// - /// Gets the user's Google id. - /// - /// This id is persistent and uniquely identifies the user - /// across all games that use Google Play Game Services. It is - /// the preferred method of uniquely identifying a player instead - /// of email address. - /// - /// - /// The user's Google id. - /// - public new string id - { - get - { - string retval = string.Empty; - if (authenticated) - { - retval = mPlatform.GetUserId(); - if (!base.id.Equals(retval)) - { - ResetIdentity(mPlatform.GetUserDisplayName(), retval, mPlatform.GetUserImageUrl()); - } - } - - return retval; - } - } - - - /// - /// Returns true (since this is the local user). - /// - public new bool isFriend - { - get { return true; } - } - - /// - /// Gets the local user's state. This is always UserState.Online for - /// the local user. - /// - public new UserState state - { - get { return UserState.Online; } - } - - - public new string AvatarURL - { - get - { - string retval = string.Empty; - if (authenticated) - { - retval = mPlatform.GetUserImageUrl(); - if (!base.id.Equals(retval)) - { - ResetIdentity(mPlatform.GetUserDisplayName(), - mPlatform.GetUserId(), retval); - } - } - - return retval; - } - } - - /// - /// Gets the player's stats. - /// - /// Callback when they are available. - public void GetStats(Action callback) - { - if (mStats == null || !mStats.Valid) - { - mPlatform.GetPlayerStats((rc, stats) => - { - mStats = stats; - callback(rc, stats); - }); - } - else - { - // 0 = success - callback(CommonStatusCodes.Success, mStats); - } - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs.meta deleted file mode 100644 index 26e6de2..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesLocalUser.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 3b5f03fe051cb4a41a3b5489bd63c24c -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs deleted file mode 100644 index 3e519f1..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs +++ /dev/null @@ -1,1358 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System; - using System.Collections.Generic; - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.Events; - using GooglePlayGames.BasicApi.Nearby; - using GooglePlayGames.BasicApi.SavedGame; - using GooglePlayGames.OurUtils; - using UnityEngine; - using UnityEngine.SocialPlatforms; - - /// - /// Provides access to the Google Play Games platform. This is an implementation of - /// UnityEngine.SocialPlatforms.ISocialPlatform. Activate this platform by calling - /// the method, then authenticate by calling - /// the method. After authentication - /// completes, you may call the other methods of this class. This is not a complete - /// implementation of the ISocialPlatform interface. Methods lacking an implementation - /// or whose behavior is at variance with the standard are noted as such. - /// - public class PlayGamesPlatform : ISocialPlatform - { - /// Singleton instance - private static volatile PlayGamesPlatform sInstance = null; - - /// status of nearby connection initialization. - private static volatile bool sNearbyInitializePending; - - /// Reference to the nearby client. - /// This is static since it can be used without using play game services. - private static volatile INearbyConnectionClient sNearbyConnectionClient; - - /// The local user. - private PlayGamesLocalUser mLocalUser = null; - - /// Reference to the platform specific implementation. - private IPlayGamesClient mClient = null; - - /// the default leaderboard we show on ShowLeaderboardUI - private string mDefaultLbUi = null; - - /// the mapping table from alias to leaderboard/achievement id. - private Dictionary mIdMap = new Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// Implementation client to use for this instance. - internal PlayGamesPlatform(IPlayGamesClient client) - { - this.mClient = Misc.CheckNotNull(client); - this.mLocalUser = new PlayGamesLocalUser(this); - } - - /// - /// Initializes a new instance of the class. - /// - private PlayGamesPlatform() - { - GooglePlayGames.OurUtils.Logger.d("Creating new PlayGamesPlatform"); - this.mLocalUser = new PlayGamesLocalUser(this); - } - - /// - /// Gets or sets a value indicating whether debug logs are enabled. This property - /// may be set before calling method. - /// - /// - /// true if debug log enabled; otherwise, false. - /// - public static bool DebugLogEnabled - { - get { return GooglePlayGames.OurUtils.Logger.DebugLogEnabled; } - - set { GooglePlayGames.OurUtils.Logger.DebugLogEnabled = value; } - } - - /// - /// Gets the singleton instance of the Play Games platform. - /// - /// - /// The instance. - /// - public static PlayGamesPlatform Instance - { - get - { - if (sInstance == null) - { - OurUtils.Logger.d("Initializing the PlayGamesPlatform instance."); - sInstance = - new PlayGamesPlatform(PlayGamesClientFactory.GetPlatformPlayGamesClient()); - } - - return sInstance; - } - } - - /// - /// Gets the nearby connection client. NOTE: Can be null until the nearby client - /// is initialized. Call InitializeNearby to use callback to be notified when initialization - /// is complete. - /// - /// The nearby. - public static INearbyConnectionClient Nearby - { - get - { - if (sNearbyConnectionClient == null && !sNearbyInitializePending) - { - sNearbyInitializePending = true; - InitializeNearby(null); - } - - return sNearbyConnectionClient; - } - } - - /// Gets the saved game client object. - /// The saved game client. - public ISavedGameClient SavedGame - { - get { return mClient.GetSavedGameClient(); } - } - - /// Gets the events client object. - /// The events client. - public IEventsClient Events - { - get { return mClient.GetEventsClient(); } - } - - /// - /// Gets the local user. - /// - /// - /// The local user. - /// - public ILocalUser localUser - { - get { return mLocalUser; } - } - - /// - /// Initializes the nearby connection platform. - /// - /// This call initializes the nearby connection platform. This - /// is independent of the Play Game Services initialization. Multiple - /// calls to this method are ignored. - /// - /// Callback invoked when complete. - public static void InitializeNearby(Action callback) - { - OurUtils.Logger.d("Calling InitializeNearby!"); - if (sNearbyConnectionClient == null) - { -#if UNITY_ANDROID && !UNITY_EDITOR - NearbyConnectionClientFactory.Create(client => { - OurUtils.Logger.d("Nearby Client Created!!"); - sNearbyConnectionClient = client; - if (callback != null) { - callback.Invoke(client); - } - else { - OurUtils.Logger.d("Initialize Nearby callback is null"); - } - }); -#else - sNearbyConnectionClient = new DummyNearbyConnectionClient(); - if (callback != null) - { - callback.Invoke(sNearbyConnectionClient); - } - -#endif - } - else if (callback != null) - { - OurUtils.Logger.d("Nearby Already initialized: calling callback directly"); - callback.Invoke(sNearbyConnectionClient); - } - else - { - OurUtils.Logger.d("Nearby Already initialized"); - } - } - - /// - /// Activates the Play Games platform as the implementation of Social.Active. - /// After calling this method, you can call methods on Social.Active. For - /// example, Social.Active.Authenticate(). - /// - /// The singleton instance. - public static PlayGamesPlatform Activate() - { - GooglePlayGames.OurUtils.Logger.d("Activating PlayGamesPlatform."); - - Social.Active = PlayGamesPlatform.Instance; - GooglePlayGames.OurUtils.Logger.d( - "PlayGamesPlatform activated: " + Social.Active); - return PlayGamesPlatform.Instance; - } - - /// - /// Specifies that the ID fromId should be implicitly replaced by toId - /// on any calls that take a leaderboard or achievement ID. - /// - /// After a mapping is - /// registered, you can use fromId instead of toId when making a call. - /// For example, the following two snippets are equivalent: - /// - /// ReportProgress("Cfiwjew894_AQ", 100.0, callback); - /// - /// ...is equivalent to: - /// - /// AddIdMapping("super-combo", "Cfiwjew894_AQ"); - /// ReportProgress("super-combo", 100.0, callback); - /// - /// - /// - /// The identifier to map. - /// - /// - /// The identifier that fromId will be mapped to. - /// - public void AddIdMapping(string fromId, string toId) - { - mIdMap[fromId] = toId; - } - - /// - /// Returns the result of the automatic sign-in attempt. Play Games SDK automatically - /// prompts users to sign in when the game is started. This API is useful for understanding - /// if your game has access to Play Games Services and should be used when your game is - /// started in order to conditionally enable or disable your Play Games Services - /// integration. - /// - /// The callback to call when authentication finishes. - public void Authenticate(Action callback) - { - mClient.Authenticate(callback); - } - - /// - /// Provided for compatibility with ISocialPlatform. - /// - /// - /// Unused parameter for this implementation. - /// Callback invoked when complete. - public void Authenticate(ILocalUser unused, Action callback) - { - Authenticate(status => callback(status == SignInStatus.Success)); - } - - /// - /// Provided for compatibility with ISocialPlatform. - /// - /// - /// Unused parameter for this implementation. - /// Callback invoked when complete. - public void Authenticate(ILocalUser unused, Action callback) - { - Authenticate(status => callback(status == SignInStatus.Success, status.ToString())); - } - - /// - /// Manually requests that your game performs sign in with Play Games Services. - /// - /// - /// Note that a sign-in attempt will be made automatically when your game's application - /// started. For this reason most games will not need to manually request to perform sign-in - /// unless the automatic sign-in attempt failed and your game requires access to Play Games - /// Services. - /// - /// - public void ManuallyAuthenticate(Action callback) { - mClient.ManuallyAuthenticate(callback); - } - - /// - /// Determines whether the user is authenticated. - /// - /// - /// true if the user is authenticated; otherwise, false. - /// - public bool IsAuthenticated() - { - return mClient != null && mClient.IsAuthenticated(); - } - - /// - /// Requests server-side access to Player Games Services for the currently signed in player. - /// - /// When requested an authorization code is returned that can be used by your game-server to - /// exchange for an access token and conditionally a refresh token (when {@code - /// forceRefreshToken} is true). The access token may then be used by your game-server to - /// access the Play Games Services web APIs. This is commonly used to complete a sign-in flow - /// by verifying the Play Games Services player id. - /// - ///

If {@code forceRefreshToken} is true, when exchanging the authorization code a refresh - /// token will be returned in addition to the access token. The refresh token allows the - /// game-server to request additional access tokens, allowing your game-server to continue - /// accesses Play Games Services while the user is not actively playing your app. - /// - /// - /// If {@code true} when the returned authorization code is - /// exchanged a refresh token will be included in addition to an access token. - public void RequestServerSideAccess(bool forceRefreshToken, Action callback) - { - Misc.CheckNotNull(callback); - - if (!IsAuthenticated()) - { - OurUtils.Logger.e("RequestServerSideAccess() can only be called after authentication."); - InvokeCallbackOnGameThread(callback, null); - return; - } - - mClient.RequestServerSideAccess(forceRefreshToken, callback); - } - - ///

- /// Loads the users. - /// - /// User identifiers. - /// Callback invoked when complete. - public void LoadUsers(string[] userIds, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetUserId() can only be called after authentication."); - callback(new IUserProfile[0]); - - return; - } - - mClient.LoadUsers(userIds, callback); - } - - /// - /// Returns the user's Google ID. - /// - /// - /// The user's Google ID. No guarantees are made as to the meaning or format of - /// this identifier except that it is unique to the user who is signed in. - /// - public string GetUserId() - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetUserId() can only be called after authentication."); - return "0"; - } - - return mClient.GetUserId(); - } - - /// - /// Gets the player stats. - /// - /// Callback invoked when completed. - public void GetPlayerStats(Action callback) - { - if (mClient != null && mClient.IsAuthenticated()) - { - mClient.GetPlayerStats(callback); - } - else - { - GooglePlayGames.OurUtils.Logger.e( - "GetPlayerStats can only be called after authentication."); - - callback(CommonStatusCodes.SignInRequired, new PlayerStats()); - } - } - - /// - /// Returns the user's display name. - /// - /// - /// The user display name (e.g. "Bruno Oliveira") - /// - public string GetUserDisplayName() - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetUserDisplayName can only be called after authentication."); - return string.Empty; - } - - return mClient.GetUserDisplayName(); - } - - /// - /// Returns the user's avatar URL if they have one. - /// - /// - /// The URL, or null if the user is not authenticated or does not have - /// an avatar. - /// - public string GetUserImageUrl() - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetUserImageUrl can only be called after authentication."); - return null; - } - - return mClient.GetUserImageUrl(); - } - - /// - /// Reports the progress of an achievement (reveal, unlock or increment). This method attempts - /// to implement the expected behavior of ISocialPlatform.ReportProgress as closely as possible, - /// as described below. Although this method works with incremental achievements for compatibility - /// purposes, calling this method for incremental achievements is not recommended, - /// since the Play Games API exposes incremental achievements in a very different way - /// than the interface presented by ISocialPlatform.ReportProgress. The implementation of this - /// method for incremental achievements attempts to produce the correct result, but may be - /// imprecise. If possible, call instead. - /// - /// - /// The ID of the achievement to unlock, reveal or increment. This can be a raw Google Play - /// Games achievement ID (alphanumeric string), or an alias that was previously configured - /// by a call to . - /// - /// - /// Progress of the achievement. If the achievement is standard (not incremental), then - /// a progress of 0.0 will reveal the achievement and 100.0 will unlock it. Behavior of other - /// values is undefined. If the achievement is incremental, then this value is interpreted - /// as the total percentage of the achievement's progress that the player should have - /// as a result of this call (regardless of the progress they had before). So if the - /// player's previous progress was 30% and this call specifies 50.0, the new progress will - /// be 50% (not 80%). - /// - /// - /// Callback that will be called to report the result of the operation: true on - /// success, false otherwise. - /// - public void ReportProgress(string achievementID, double progress, Action callback) - { - callback = ToOnGameThread(callback); - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "ReportProgress can only be called after authentication."); - callback.Invoke(false); - - return; - } - - // map ID, if it's in the dictionary - GooglePlayGames.OurUtils.Logger.d("ReportProgress, " + achievementID + ", " + progress); - achievementID = MapId(achievementID); - - // if progress is 0.0, we just want to reveal it - if (progress < 0.000001) - { - GooglePlayGames.OurUtils.Logger.d( - "Progress 0.00 interpreted as request to reveal."); - mClient.RevealAchievement(achievementID, callback); - return; - } - - mClient.LoadAchievements(ach => - { - for (int i = 0; i < ach.Length; i++) - { - if (ach[i].Id == achievementID) - { - if (ach[i].IsIncremental) - { - GooglePlayGames.OurUtils.Logger.d("Progress " + progress + - " interpreted as incremental target (approximate)."); - - if (progress >= 0.0 && progress <= 1.0) - { - // in a previous version, incremental progress was reported by using the range [0-1] - GooglePlayGames.OurUtils.Logger.w( - "Progress " + progress + - " is less than or equal to 1. You might be trying to use values in the range of [0,1], while values are expected to be within the range [0,100]. If you are using the latter, you can safely ignore this message."); - } - - mClient.SetStepsAtLeast(achievementID, progressToSteps(progress, ach[i].TotalSteps), callback); - } - else - { - if (progress >= 100) - { - // unlock it! - GooglePlayGames.OurUtils.Logger.d("Progress " + progress + " interpreted as UNLOCK."); - mClient.UnlockAchievement(achievementID, callback); - } - else - { - // not enough to unlock - GooglePlayGames.OurUtils.Logger.d( - "Progress " + progress + " not enough to unlock non-incremental achievement."); - callback.Invoke(false); - } - } - - return; - } - } - - // Achievement not found - GooglePlayGames.OurUtils.Logger.e("Unable to locate achievement " + achievementID); - callback.Invoke(false); - }); - } - - internal static int progressToSteps(double progress, int totalSteps) { - return (progress >= 100.0) ? totalSteps : (int) (progress * totalSteps / 100.0); - } - - /// - /// Reveals the achievement with the passed identifier. This is a Play Games extension of the ISocialPlatform API. - /// - /// If the operation succeeds, the callback - /// will be invoked on the game thread with true. If the operation fails, the - /// callback will be invoked with false. This operation will immediately fail if - /// the user is not authenticated (i.e. the callback will immediately be invoked with - /// false). If the achievement is already in a revealed state, this call will - /// succeed immediately. - /// - /// - /// The ID of the achievement to increment. This can be a raw Google Play - /// Games achievement ID (alphanumeric string), or an alias that was previously configured - /// by a call to . - /// - /// - /// The callback to call to report the success or failure of the operation. The callback - /// will be called with true to indicate success or false for failure. - /// - public void RevealAchievement(string achievementID, Action callback = null) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "RevealAchievement can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - // map ID, if it's in the dictionary - GooglePlayGames.OurUtils.Logger.d( - "RevealAchievement: " + achievementID); - achievementID = MapId(achievementID); - mClient.RevealAchievement(achievementID, callback); - } - - /// - /// Unlocks the achievement with the passed identifier. This is a Play Games extension of the ISocialPlatform API. - /// - /// If the operation succeeds, the callback - /// will be invoked on the game thread with true. If the operation fails, the - /// callback will be invoked with false. This operation will immediately fail if - /// the user is not authenticated (i.e. the callback will immediately be invoked with - /// false). If the achievement is already unlocked, this call will - /// succeed immediately. - /// - /// - /// The ID of the achievement to increment. This can be a raw Google Play - /// Games achievement ID (alphanumeric string), or an alias that was previously configured - /// by a call to . - /// - /// - /// The callback to call to report the success or failure of the operation. The callback - /// will be called with true to indicate success or false for failure. - /// - public void UnlockAchievement(string achievementID, Action callback = null) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "UnlockAchievement can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - // map ID, if it's in the dictionary - GooglePlayGames.OurUtils.Logger.d( - "UnlockAchievement: " + achievementID); - achievementID = MapId(achievementID); - mClient.UnlockAchievement(achievementID, callback); - } - - /// - /// Increments an achievement. This is a Play Games extension of the ISocialPlatform API. - /// - /// - /// The ID of the achievement to increment. This can be a raw Google Play - /// Games achievement ID (alphanumeric string), or an alias that was previously configured - /// by a call to . - /// - /// - /// The number of steps to increment the achievement by. - /// - /// - /// The callback to call to report the success or failure of the operation. The callback - /// will be called with true to indicate success or false for failure. - /// - public void IncrementAchievement(string achievementID, int steps, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "IncrementAchievement can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - // map ID, if it's in the dictionary - GooglePlayGames.OurUtils.Logger.d( - "IncrementAchievement: " + achievementID + ", steps " + steps); - achievementID = MapId(achievementID); - mClient.IncrementAchievement(achievementID, steps, callback); - } - - /// - /// Set an achievement to have at least the given number of steps completed. - /// Calling this method while the achievement already has more steps than - /// the provided value is a no-op. Once the achievement reaches the - /// maximum number of steps, the achievement is automatically unlocked, - /// and any further mutation operations are ignored. - /// - /// - /// The ID of the achievement to increment. This can be a raw Google Play - /// Games achievement ID (alphanumeric string), or an alias that was previously configured - /// by a call to . - /// - /// - /// The number of steps to increment the achievement by. - /// - /// - /// The callback to call to report the success or failure of the operation. The callback - /// will be called with true to indicate success or false for failure. - /// - public void SetStepsAtLeast(string achievementID, int steps, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "SetStepsAtLeast can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - // map ID, if it's in the dictionary - GooglePlayGames.OurUtils.Logger.d( - "SetStepsAtLeast: " + achievementID + ", steps " + steps); - achievementID = MapId(achievementID); - mClient.SetStepsAtLeast(achievementID, steps, callback); - } - - /// - /// Loads the Achievement descriptions. - /// - /// The callback to receive the descriptions - public void LoadAchievementDescriptions(Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "LoadAchievementDescriptions can only be called after authentication."); - if (callback != null) - { - callback.Invoke(null); - } - - return; - } - - mClient.LoadAchievements(ach => - { - IAchievementDescription[] data = new IAchievementDescription[ach.Length]; - for (int i = 0; i < data.Length; i++) - { - data[i] = new PlayGamesAchievement(ach[i]); - } - - callback.Invoke(data); - }); - } - - /// - /// Loads the achievement state for the current user. - /// - /// The callback to receive the achievements - public void LoadAchievements(Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("LoadAchievements can only be called after authentication."); - callback.Invoke(null); - - return; - } - - mClient.LoadAchievements(ach => - { - IAchievement[] data = new IAchievement[ach.Length]; - for (int i = 0; i < data.Length; i++) - { - data[i] = new PlayGamesAchievement(ach[i]); - } - - callback.Invoke(data); - }); - } - - /// - /// Creates an achievement object which may be subsequently used to report an - /// achievement. - /// - /// - /// The achievement object. - /// - public IAchievement CreateAchievement() - { - return new PlayGamesAchievement(); - } - - /// - /// Reports a score to a leaderboard. - /// - /// - /// The score to report. - /// - /// - /// The ID of the leaderboard on which the score is to be posted. This may be a raw - /// Google Play Games leaderboard ID or an alias configured through a call to - /// . - /// - /// - /// The callback to call to report the success or failure of the operation. The callback - /// will be called with true to indicate success or false for failure. - /// - public void ReportScore(long score, string board, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("ReportScore can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - GooglePlayGames.OurUtils.Logger.d("ReportScore: score=" + score + ", board=" + board); - string leaderboardId = MapId(board); - mClient.SubmitScore(leaderboardId, score, callback); - } - - /// - /// Submits the score for the currently signed-in player - /// to the leaderboard associated with a specific id - /// and metadata (such as something the player did to earn the score). - /// - /// Score to report. - /// leaderboard id. - /// metadata about the score. - /// Callback invoked upon completion. - public void ReportScore(long score, string board, string metadata, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("ReportScore can only be called after authentication."); - if (callback != null) - { - callback.Invoke(false); - } - - return; - } - - GooglePlayGames.OurUtils.Logger.d("ReportScore: score=" + score + - ", board=" + board + - " metadata=" + metadata); - string leaderboardId = MapId(board); - mClient.SubmitScore(leaderboardId, score, metadata, callback); - } - - /// - /// Loads the scores relative the player. - /// - /// This returns the 25 - /// (which is the max results returned by the SDK per call) scores - /// that are around the player's score on the Public, all time leaderboard. - /// Use the overloaded methods which are specific to GPGS to modify these - /// parameters. - /// - /// Leaderboard Id - /// Callback to invoke when completed. - public void LoadScores(string leaderboardId, Action callback) - { - LoadScores( - leaderboardId, - LeaderboardStart.PlayerCentered, - mClient.LeaderboardMaxResults(), - LeaderboardCollection.Public, - LeaderboardTimeSpan.AllTime, - (scoreData) => callback(scoreData.Scores)); - } - - /// - /// Loads the scores using the provided parameters. This call may fail when trying to load friends with - /// ResponseCode.ResolutionRequired if the user has not share the friends list with the game. In this case, use - /// AskForLoadFriendsResolution to request access. - /// - /// Leaderboard identifier. - /// Start either top scores, or player centered. - /// Row count. the number of rows to return. - /// Collection. social or public - /// Time span. daily, weekly, all-time - /// Callback to invoke when completed. - public void LoadScores( - string leaderboardId, - LeaderboardStart start, - int rowCount, - LeaderboardCollection collection, - LeaderboardTimeSpan timeSpan, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("LoadScores can only be called after authentication."); - callback(new LeaderboardScoreData( - leaderboardId, - ResponseStatus.NotAuthorized)); - return; - } - - mClient.LoadScores( - leaderboardId, - start, - rowCount, - collection, - timeSpan, - callback); - } - - /// - /// Loads more scores. This call may fail when trying to load friends with - /// ResponseCode.ResolutionRequired if the user has not share the friends list with the game. In this case, use - /// AskForLoadFriendsResolution to request access. - /// - /// This is used to load the next "page" of scores. - /// Token used to recording the loading. - /// Row count. - /// Callback invoked when complete. - public void LoadMoreScores( - ScorePageToken token, - int rowCount, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("LoadMoreScores can only be called after authentication."); - callback( - new LeaderboardScoreData( - token.LeaderboardId, - ResponseStatus.NotAuthorized)); - return; - } - - mClient.LoadMoreScores(token, rowCount, callback); - } - - /// - /// Returns a leaderboard object that can be configured to - /// load scores. - /// - /// The leaderboard object. - public ILeaderboard CreateLeaderboard() - { - return new PlayGamesLeaderboard(mDefaultLbUi); - } - - /// - /// Shows the standard Google Play Games achievements user interface, - /// which allows the player to browse their achievements. - /// - public void ShowAchievementsUI() - { - ShowAchievementsUI(null); - } - - /// - /// Shows the standard Google Play Games achievements user interface, - /// which allows the player to browse their achievements. - /// - /// If non-null, the callback is invoked when - /// the achievement UI is dismissed - public void ShowAchievementsUI(Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("ShowAchievementsUI can only be called after authentication."); - return; - } - - GooglePlayGames.OurUtils.Logger.d("ShowAchievementsUI callback is " + callback); - mClient.ShowAchievementsUI(callback); - } - - /// - /// Shows the standard Google Play Games leaderboards user interface, - /// which allows the player to browse their leaderboards. If you have - /// configured a specific leaderboard as the default through a call to - /// , the UI will show that - /// specific leaderboard only. Otherwise, a list of all the leaderboards - /// will be shown. - /// - public void ShowLeaderboardUI() - { - GooglePlayGames.OurUtils.Logger.d("ShowLeaderboardUI with default ID"); - ShowLeaderboardUI(MapId(mDefaultLbUi), null); - } - - /// - /// Shows the standard Google Play Games leaderboard UI for the given - /// leaderboard. - /// - /// - /// The ID of the leaderboard to display. This may be a raw - /// Google Play Games leaderboard ID or an alias configured through a call to - /// . - /// - public void ShowLeaderboardUI(string leaderboardId) - { - if (leaderboardId != null) - { - leaderboardId = MapId(leaderboardId); - } - - ShowLeaderboardUI(leaderboardId, LeaderboardTimeSpan.AllTime, null); - } - - /// - /// Shows the leaderboard UI and calls the specified callback upon - /// completion. - /// - /// leaderboard ID, can be null meaning all leaderboards. - /// Callback to call. If null, nothing is called. - public void ShowLeaderboardUI(string leaderboardId, Action callback) - { - ShowLeaderboardUI(leaderboardId, LeaderboardTimeSpan.AllTime, callback); - } - - /// - /// Shows the leaderboard UI and calls the specified callback upon - /// completion. - /// - /// leaderboard ID, can be null meaning all leaderboards. - /// Timespan to display scores in the leaderboard. - /// Callback to call. If null, nothing is called. - public void ShowLeaderboardUI( - string leaderboardId, - LeaderboardTimeSpan span, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("ShowLeaderboardUI can only be called after authentication."); - if (callback != null) - { - callback(UIStatus.NotAuthorized); - } - - return; - } - - GooglePlayGames.OurUtils.Logger.d("ShowLeaderboardUI, lbId=" + - leaderboardId + " callback is " + callback); - mClient.ShowLeaderboardUI(leaderboardId, span, callback); - } - - /// - /// Sets the default leaderboard for the leaderboard UI. After calling this - /// method, a call to will show only the specified - /// leaderboard instead of showing the list of all leaderboards. - /// - /// - /// The ID of the leaderboard to display on the default UI. This may be a raw - /// Google Play Games leaderboard ID or an alias configured through a call to - /// . - /// - public void SetDefaultLeaderboardForUI(string lbid) - { - GooglePlayGames.OurUtils.Logger.d("SetDefaultLeaderboardForUI: " + lbid); - if (lbid != null) - { - lbid = MapId(lbid); - } - - mDefaultLbUi = lbid; - } - - /// - /// Loads the friends that also play this game. See loadConnectedPlayers. - /// - /// This is a callback variant of LoadFriends. When completed, - /// the friends list set in the user object, so they can accessed via the - /// friends property as needed. - /// - /// The current local user - /// Callback invoked when complete. - public void LoadFriends(ILocalUser user, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "LoadScores can only be called after authentication."); - if (callback != null) - { - callback(false); - } - - return; - } - - mClient.LoadFriends(callback); - } - - /// - /// Loads the leaderboard based on the constraints in the leaderboard - /// object. - /// - /// The leaderboard object. This is created by - /// calling CreateLeaderboard(), and then initialized appropriately. - /// Callback invoked when complete. - public void LoadScores(ILeaderboard board, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e("LoadScores can only be called after authentication."); - if (callback != null) - { - callback(false); - } - - return; - } - - LeaderboardTimeSpan timeSpan; - switch (board.timeScope) - { - case TimeScope.AllTime: - timeSpan = LeaderboardTimeSpan.AllTime; - break; - case TimeScope.Week: - timeSpan = LeaderboardTimeSpan.Weekly; - break; - case TimeScope.Today: - timeSpan = LeaderboardTimeSpan.Daily; - break; - default: - timeSpan = LeaderboardTimeSpan.AllTime; - break; - } - - ((PlayGamesLeaderboard) board).loading = true; - GooglePlayGames.OurUtils.Logger.d("LoadScores, board=" + board + - " callback is " + callback); - mClient.LoadScores( - board.id, - LeaderboardStart.PlayerCentered, - board.range.count > 0 ? board.range.count : mClient.LeaderboardMaxResults(), - board.userScope == UserScope.FriendsOnly ? LeaderboardCollection.Social : LeaderboardCollection.Public, - timeSpan, - (scoreData) => HandleLoadingScores( - (PlayGamesLeaderboard) board, scoreData, callback)); - } - - /// - /// Check if the leaderboard is currently loading. - /// - /// true, if loading was gotten, false otherwise. - /// The leaderboard to check for loading in progress - public bool GetLoading(ILeaderboard board) - { - return board != null && board.loading; - } - - /// - /// Shows the Player Profile UI for the given user identifier. - /// - /// User Identifier. - /// - /// The game's own display name of the player referred to by userId. - /// - /// - /// The game's own display name of the current player. - /// - /// Callback invoked upon completion. - public void ShowCompareProfileWithAlternativeNameHintsUI(string userId, - string otherPlayerInGameName, - string currentPlayerInGameName, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "ShowCompareProfileWithAlternativeNameHintsUI can only be called after authentication."); - InvokeCallbackOnGameThread(callback, UIStatus.NotAuthorized); - - return; - } - - GooglePlayGames.OurUtils.Logger.d( - "ShowCompareProfileWithAlternativeNameHintsUI, userId=" + userId + " callback is " + - callback); - mClient.ShowCompareProfileWithAlternativeNameHintsUI(userId, otherPlayerInGameName, - currentPlayerInGameName, callback); - } - - /// - /// Returns if the user has allowed permission for the game to access the friends list. - /// - /// If true, this call will clear any locally cached data and - /// attempt to fetch the latest data from the server. Normally, this should be set to {@code - /// false} to gain advantages of data caching. - /// Callback invoked upon completion. - public void GetFriendsListVisibility(bool forceReload, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetFriendsListVisibility can only be called after authentication."); - InvokeCallbackOnGameThread(callback, FriendsListVisibilityStatus.NotAuthorized); - return; - } - - GooglePlayGames.OurUtils.Logger.d("GetFriendsListVisibility, callback is " + callback); - mClient.GetFriendsListVisibility(forceReload, callback); - } - - /// - /// Shows the appropriate platform-specific friends sharing UI. - /// The callback to invoke when complete. If null, - /// no callback is called. - /// - public void AskForLoadFriendsResolution(Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "AskForLoadFriendsResolution can only be called after authentication."); - InvokeCallbackOnGameThread(callback, UIStatus.NotAuthorized); - return; - } - - GooglePlayGames.OurUtils.Logger.d("AskForLoadFriendsResolution callback is " + callback); - mClient.AskForLoadFriendsResolution(callback); - } - - /// - /// Gets status of the last call to load friends. - /// - public LoadFriendsStatus GetLastLoadFriendsStatus() - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "GetLastLoadFriendsStatus can only be called after authentication."); - return LoadFriendsStatus.NotAuthorized; - } - - return mClient.GetLastLoadFriendsStatus(); - } - - /// - /// Loads the first page of the user's friends - /// - /// - /// The number of entries to request for this initial page. Note that if cached - /// data already exists, the returned buffer may contain more than this size, but it is - /// guaranteed to contain at least this many if the collection contains enough records. - /// - /// - /// If true, this call will clear any locally cached data and attempt to - /// fetch the latest data from the server. This would commonly be used for something like a - /// user-initiated refresh. Normally, this should be set to {@code false} to gain advantages - /// of data caching. Callback invoked upon - /// completion. - public void LoadFriends(int pageSize, bool forceReload, - Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "LoadFriends can only be called after authentication."); - InvokeCallbackOnGameThread(callback, LoadFriendsStatus.NotAuthorized); - return; - } - - mClient.LoadFriends(pageSize, forceReload, callback); - } - - /// - /// Loads the friends list page - /// - /// - /// The number of entries to request for this initial page. Note that if cached - /// data already exists, the returned buffer may contain more than this size, but it is - /// guaranteed to contain at least this many if the collection contains enough records. - /// - /// - public void LoadMoreFriends(int pageSize, Action callback) - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.e( - "LoadMoreFriends can only be called after authentication."); - InvokeCallbackOnGameThread(callback, LoadFriendsStatus.NotAuthorized); - return; - } - - mClient.LoadMoreFriends(pageSize, callback); - } - - /// - /// Handles the processing of scores during loading. - /// - /// leaderboard being loaded - /// Score data. - /// Callback invoked when complete. - internal void HandleLoadingScores( - PlayGamesLeaderboard board, - LeaderboardScoreData scoreData, - Action callback) - { - bool ok = board.SetFromData(scoreData); - if (ok && !board.HasAllScores() && scoreData.NextPageToken != null) - { - int rowCount = board.range.count - board.ScoreCount; - - // need to load more scores - mClient.LoadMoreScores( - scoreData.NextPageToken, - rowCount, - (nextScoreData) => - HandleLoadingScores(board, nextScoreData, callback)); - } - else - { - callback(ok); - } - } - - /// - /// Internal implmentation of getFriends.Gets the friends. - /// - /// The friends. - internal IUserProfile[] GetFriends() - { - if (!IsAuthenticated()) - { - GooglePlayGames.OurUtils.Logger.d("Cannot get friends when not authenticated!"); - return new IUserProfile[0]; - } - - return mClient.GetFriends(); - } - - /// - /// Maps the alias to the identifier. - /// - /// This maps an aliased ID to the actual id. The intent of - /// this method is to allow easy to read constants to be used instead of - /// the generated ids. - /// - /// The identifier, or null if not found. - /// Alias to map - private string MapId(string id) - { - if (id == null) - { - return null; - } - - if (mIdMap.ContainsKey(id)) - { - string result = mIdMap[id]; - GooglePlayGames.OurUtils.Logger.d("Mapping alias " + id + " to ID " + result); - return result; - } - - return id; - } - - private static void InvokeCallbackOnGameThread(Action callback, T data) - { - if (callback == null) - { - return; - } - - PlayGamesHelperObject.RunOnGameThread(() => { callback(data); }); - } - - private static Action ToOnGameThread(Action toConvert) - { - if (toConvert == null) - { - return delegate { }; - } - - return (val) => PlayGamesHelperObject.RunOnGameThread(() => toConvert(val)); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs.meta deleted file mode 100644 index b448e45..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: c1de7754a6e7f4fb08b76780a184b3ca -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs deleted file mode 100644 index d44dfba..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System; - using UnityEngine.SocialPlatforms; - - /// - /// Represents a Google Play Games score that can be sent to a leaderboard. - /// - public class PlayGamesScore : IScore - { - private string mLbId = null; - private long mValue = 0; - private ulong mRank = 0; - private string mPlayerId = string.Empty; - private string mMetadata = string.Empty; - - private DateTime mDate = new DateTime(1970, 1, 1, 0, 0, 0); - - internal PlayGamesScore(DateTime date, string leaderboardId, - ulong rank, string playerId, ulong value, string metadata) - { - this.mDate = date; - mLbId = leaderboardID; - this.mRank = rank; - this.mPlayerId = playerId; - this.mValue = (long) value; - this.mMetadata = metadata; - } - - /// - /// Reports the score. Equivalent to . - /// - public void ReportScore(Action callback) - { - PlayGamesPlatform.Instance.ReportScore(mValue, mLbId, mMetadata, callback); - } - - /// - /// Gets or sets the leaderboard id. - /// - /// - /// The leaderboard id. - /// - public string leaderboardID - { - get { return mLbId; } - - set { mLbId = value; } - } - - /// - /// Gets or sets the score value. - /// - /// - /// The value. - /// - public long value - { - get { return mValue; } - - set { mValue = value; } - } - - /// - /// Not implemented. Returns Jan 01, 1970, 00:00:00 - /// - public DateTime date - { - get { return mDate; } - } - - /// - /// Not implemented. Returns the value converted to a string, unformatted. - /// - public string formattedValue - { - get { return mValue.ToString(); } - } - - /// - /// Not implemented. Returns the empty string. - /// - public string userID - { - get { return mPlayerId; } - } - - /// - /// Not implemented. Returns 1. - /// - public int rank - { - get { return (int) mRank; } - } - - /// - /// Gets the metaData (scoreTag). - /// - /// - /// The metaData. - /// - public string metaData - { - get { return mMetadata; } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs.meta deleted file mode 100644 index 1168228..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesScore.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 2a6e2425305ab455a91061b1eb955b38 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs deleted file mode 100644 index 62820e4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs +++ /dev/null @@ -1,217 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using System; - using System.Collections; - using GooglePlayGames.OurUtils; - using UnityEngine; -#if UNITY_2017_2_OR_NEWER - using UnityEngine.Networking; -#endif - using UnityEngine.SocialPlatforms; - - /// - /// Represents a Google Play Games user profile. In the current implementation, - /// this is only used as a base class of - /// and should not be used directly. - /// - public class PlayGamesUserProfile : IUserProfile - { - private string mDisplayName; - private string mPlayerId; - private string mAvatarUrl; - private bool mIsFriend; - - private volatile bool mImageLoading = false; - private Texture2D mImage; - - internal PlayGamesUserProfile(string displayName, string playerId, - string avatarUrl) - { - mDisplayName = displayName; - mPlayerId = playerId; - setAvatarUrl(avatarUrl); - mImageLoading = false; - mIsFriend = false; - } - - internal PlayGamesUserProfile(string displayName, string playerId, string avatarUrl, - bool isFriend) - { - mDisplayName = displayName; - mPlayerId = playerId; - mAvatarUrl = avatarUrl; - mImageLoading = false; - mIsFriend = isFriend; - } - - protected void ResetIdentity(string displayName, string playerId, - string avatarUrl) - { - mDisplayName = displayName; - mPlayerId = playerId; - mIsFriend = false; - if (mAvatarUrl != avatarUrl) - { - mImage = null; - setAvatarUrl(avatarUrl); - } - - mImageLoading = false; - } - - #region IUserProfile implementation - - public string userName - { - get { return mDisplayName; } - } - - public string id - { - get { return mPlayerId; } - } - - public string gameId - { - get { return mPlayerId; } - } - - public bool isFriend - { - get { return mIsFriend; } - } - - public UserState state - { - get { return UserState.Online; } - } - - public Texture2D image - { - get - { - if (!mImageLoading && mImage == null && !string.IsNullOrEmpty(AvatarURL)) - { - OurUtils.Logger.d("Starting to load image: " + AvatarURL); - mImageLoading = true; - PlayGamesHelperObject.RunCoroutine(LoadImage()); - } - - return mImage; - } - } - - #endregion - - public string AvatarURL - { - get { return mAvatarUrl; } - } - - /// - /// Loads the local user's image from the url. Loading urls - /// is asynchronous so the return from this call is fast, - /// the image is returned once it is loaded. null is returned - /// up to that point. - /// - internal IEnumerator LoadImage() - { - // the url can be null if the user does not have an - // avatar configured. - if (!string.IsNullOrEmpty(AvatarURL)) - { -#if UNITY_2017_2_OR_NEWER - UnityWebRequest www = UnityWebRequestTexture.GetTexture(AvatarURL); - www.SendWebRequest(); -#else - WWW www = new WWW(AvatarURL); -#endif - while (!www.isDone) - { - yield return null; - } - - if (www.error == null) - { -#if UNITY_2017_2_OR_NEWER - this.mImage = DownloadHandlerTexture.GetContent(www); -#else - this.mImage = www.texture; -#endif - } - else - { - mImage = Texture2D.blackTexture; - OurUtils.Logger.e("Error downloading image: " + www.error); - } - - mImageLoading = false; - } - else - { - OurUtils.Logger.e("No URL found."); - mImage = Texture2D.blackTexture; - mImageLoading = false; - } - } - - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (ReferenceEquals(this, obj)) - { - return true; - } - - PlayGamesUserProfile other = obj as PlayGamesUserProfile; - if (other == null) - { - return false; - } - - return StringComparer.Ordinal.Equals(mPlayerId, other.mPlayerId); - } - - public override int GetHashCode() - { - return typeof(PlayGamesUserProfile).GetHashCode() ^ mPlayerId.GetHashCode(); - } - - public override string ToString() - { - return string.Format("[Player: '{0}' (id {1})]", mDisplayName, mPlayerId); - } - - private void setAvatarUrl(string avatarUrl) - { - mAvatarUrl = avatarUrl; - if (!avatarUrl.StartsWith("https") && avatarUrl.StartsWith("http")) - { - mAvatarUrl = avatarUrl.Insert(4, "s"); - } - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs.meta deleted file mode 100644 index b5bc517..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: ab1b90315f37e498a849765260dd436c -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils.meta deleted file mode 100644 index 01304aa..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: dc34e4ac2f7e6420da72898e7b511098 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs deleted file mode 100644 index af8b8c3..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.OurUtils -{ - using System; - using UnityEngine; - - public class Logger - { - private static bool debugLogEnabled = false; - - public static bool DebugLogEnabled - { - get { return debugLogEnabled; } - - set { debugLogEnabled = value; } - } - - private static bool warningLogEnabled = true; - - public static bool WarningLogEnabled - { - get { return warningLogEnabled; } - - set { warningLogEnabled = value; } - } - - public static void d(string msg) - { - if (debugLogEnabled) - { - PlayGamesHelperObject.RunOnGameThread(() => - Debug.Log(ToLogMessage(string.Empty, "DEBUG", msg))); - } - } - - public static void w(string msg) - { - if (warningLogEnabled) - { - PlayGamesHelperObject.RunOnGameThread(() => - Debug.LogWarning(ToLogMessage("!!!", "WARNING", msg))); - } - } - - public static void e(string msg) - { - if (warningLogEnabled) - { - PlayGamesHelperObject.RunOnGameThread(() => - Debug.LogWarning(ToLogMessage("***", "ERROR", msg))); - } - } - - public static string describe(byte[] b) - { - return b == null ? "(null)" : "byte[" + b.Length + "]"; - } - - private static string ToLogMessage(string prefix, string logType, string msg) - { - string timeString = null; - try - { - timeString = DateTime.Now.ToString("MM/dd/yy H:mm:ss zzz"); - } - catch (Exception) - { - PlayGamesHelperObject.RunOnGameThread(() => - Debug.LogWarning("*** [Play Games Plugin " + PluginVersion.VersionString + "] ERROR: Failed to format DateTime.Now")); - timeString = string.Empty; - } - - return string.Format("{0} [Play Games Plugin " + PluginVersion.VersionString+ "] {1} {2}: {3}", - prefix, timeString, logType, msg); - } - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs.meta deleted file mode 100644 index ab9a2a2..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Logger.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: cde7cfd197b4a47edac2efe305e22e78 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs deleted file mode 100644 index 8af6ea8..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.OurUtils -{ - using System; - - public static class Misc - { - public static bool BuffersAreIdentical(byte[] a, byte[] b) - { - if (a == b) - { - // not only identical but the very same! - return true; - } - - if (a == null || b == null) - { - // one of them is null, the other one isn't - return false; - } - - if (a.Length != b.Length) - { - return false; - } - - for (int i = 0; i < a.Length; i++) - { - if (a[i] != b[i]) - { - return false; - } - } - - return true; - } - - public static byte[] GetSubsetBytes(byte[] array, int offset, int length) - { - if (array == null) - { - throw new ArgumentNullException("array"); - } - - if (offset < 0 || offset >= array.Length) - { - throw new ArgumentOutOfRangeException("offset"); - } - - if (length < 0 || (array.Length - offset) < length) - { - throw new ArgumentOutOfRangeException("length"); - } - - if (offset == 0 && length == array.Length) - { - return array; - } - - byte[] piece = new byte[length]; - Array.Copy(array, offset, piece, 0, length); - return piece; - } - - public static T CheckNotNull(T value) - { - if (value == null) - { - throw new ArgumentNullException(); - } - - return value; - } - - public static T CheckNotNull(T value, string paramName) - { - if (value == null) - { - throw new ArgumentNullException(paramName); - } - - return value; - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs.meta deleted file mode 100644 index b340ef4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/Misc.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: ee52269f55933442fa5ea52e688ebec2 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs deleted file mode 100644 index 3b09327..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs +++ /dev/null @@ -1,104 +0,0 @@ -#if UNITY_ANDROID - -namespace GooglePlayGames.OurUtils -{ - using BasicApi.Nearby; - using System; - using UnityEngine; - - public class NearbyHelperObject : MonoBehaviour - { - // our (singleton) instance - private static NearbyHelperObject instance = null; - - // timers to keep track of discovery and advertising - private static double mAdvertisingRemaining = 0; - private static double mDiscoveryRemaining = 0; - - // nearby client to stop discovery and to stop advertising - private static INearbyConnectionClient mClient = null; - - public static void CreateObject(INearbyConnectionClient client) - { - if (instance != null) - { - return; - } - - mClient = client; - if (Application.isPlaying) - { - // add an invisible game object to the scene - GameObject obj = new GameObject("PlayGames_NearbyHelper"); - DontDestroyOnLoad(obj); - instance = obj.AddComponent(); - } - else - { - instance = new NearbyHelperObject(); - } - } - - private static double ToSeconds(TimeSpan? span) - { - if (!span.HasValue) - { - return 0; - } - - if (span.Value.TotalSeconds < 0) - { - return 0; - } - - return span.Value.TotalSeconds; - } - - public static void StartAdvertisingTimer(TimeSpan? span) - { - mAdvertisingRemaining = ToSeconds(span); - } - - public static void StartDiscoveryTimer(TimeSpan? span) - { - mDiscoveryRemaining = ToSeconds(span); - } - - public void Awake() - { - DontDestroyOnLoad(gameObject); - } - - public void OnDisable() - { - if (instance == this) - { - instance = null; - } - } - - public void Update() - { - // check if currently advertising - if (mAdvertisingRemaining > 0) - { - mAdvertisingRemaining -= Time.deltaTime; - if (mAdvertisingRemaining < 0) - { - mClient.StopAdvertising(); - } - } - - // check if currently discovering - if (mDiscoveryRemaining > 0) - { - mDiscoveryRemaining -= Time.deltaTime; - if (mDiscoveryRemaining < 0) - { - mClient.StopDiscovery(mClient.GetServiceId()); - } - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs.meta deleted file mode 100644 index 7e4b250..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/NearbyHelperObject.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: b66cca4a5a1f4a5092a280c452185308 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs deleted file mode 100644 index 5fce45b..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID -namespace GooglePlayGames.OurUtils -{ - using UnityEngine; - using System; - - public static class PlatformUtils - { - /// - /// Check if the Google Play Games platform is supported at runtime. - /// - /// If the platform is supported. - public static bool Supported - { - get - { -#if UNITY_EDITOR - return false; -#else - var up = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); - var ca = up.GetStatic("currentActivity"); - var packageManager = ca.Call("getPackageManager"); - - AndroidJavaObject launchIntent = null; - //if the app is installed, no errors. Else, doesn't get past next line - try - { - launchIntent = - packageManager.Call("getLaunchIntentForPackage", "com.google.android.play.games"); - } - catch (Exception) - { - return false; - } - - return launchIntent != null; -#endif - } - } - } -} -#endif //UNITY_ANDROID \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs.meta deleted file mode 100644 index 7b6bedf..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlatformUtils.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 053811e778f3d4e3e98065f5db5bd005 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs deleted file mode 100644 index 6c8551c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs +++ /dev/null @@ -1,222 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames.OurUtils -{ - using System; - using System.Collections; - using UnityEngine; - using System.Collections.Generic; - - public class PlayGamesHelperObject : MonoBehaviour - { - // our (singleton) instance - private static PlayGamesHelperObject instance = null; - - // are we a dummy instance (used in the editor?) - private static bool sIsDummy = false; - - // queue of actions to run on the game thread - private static List sQueue = new List(); - - // member variable used to copy actions from the sQueue and - // execute them on the game thread. It is a member variable - // to help minimize memory allocations. - List localQueue = new List(); - - // flag that alerts us that we should check the queue - // (we do this just so we don't have to lock() the queue every - // frame to check if it's empty or not). - private volatile static bool sQueueEmpty = true; - - // callback for application pause and focus events - private static List> sPauseCallbackList = - new List>(); - - private static List> sFocusCallbackList = - new List>(); - - // Call this once from the game thread - public static void CreateObject() - { - if (instance != null) - { - return; - } - - if (Application.isPlaying) - { - // add an invisible game object to the scene - GameObject obj = new GameObject("PlayGames_QueueRunner"); - DontDestroyOnLoad(obj); - instance = obj.AddComponent(); - } - else - { - instance = new PlayGamesHelperObject(); - sIsDummy = true; - } - } - - public void Awake() - { - DontDestroyOnLoad(gameObject); - } - - public void OnDisable() - { - if (instance == this) - { - instance = null; - } - } - - public static void RunCoroutine(IEnumerator action) - { - if (instance != null) - { - RunOnGameThread(() => instance.StartCoroutine(action)); - } - } - - public static void RunOnGameThread(System.Action action) - { - if (action == null) - { - throw new ArgumentNullException("action"); - } - - if (sIsDummy) - { - return; - } - - lock (sQueue) - { - sQueue.Add(action); - sQueueEmpty = false; - } - } - - public void Update() - { - if (sIsDummy || sQueueEmpty) - { - return; - } - - // first copy the shared queue into a local queue - localQueue.Clear(); - lock (sQueue) - { - // transfer the whole queue to our local queue - localQueue.AddRange(sQueue); - sQueue.Clear(); - sQueueEmpty = true; - } - - // execute queued actions (from local queue) - // use a loop to avoid extra memory allocations using the - // forEach - for (int i = 0; i < localQueue.Count; i++) - { - localQueue[i].Invoke(); - } - } - - public void OnApplicationFocus(bool focused) - { - foreach (Action cb in sFocusCallbackList) - { - try - { - cb(focused); - } - catch (Exception e) - { - Logger.e("Exception in OnApplicationFocus:" + - e.Message + "\n" + e.StackTrace); - } - } - } - - public void OnApplicationPause(bool paused) - { - foreach (Action cb in sPauseCallbackList) - { - try - { - cb(paused); - } - catch (Exception e) - { - Logger.e("Exception in OnApplicationPause:" + - e.Message + "\n" + e.StackTrace); - } - } - } - - /// - /// Adds a callback that is called when the Unity method OnApplicationFocus - /// is called. - /// - /// - /// Callback. - public static void AddFocusCallback(Action callback) - { - if (!sFocusCallbackList.Contains(callback)) - { - sFocusCallbackList.Add(callback); - } - } - - /// - /// Removes the callback from the list to call when handling OnApplicationFocus - /// is called. - /// - /// true, if focus callback was removed, false otherwise. - /// Callback. - public static bool RemoveFocusCallback(Action callback) - { - return sFocusCallbackList.Remove(callback); - } - - /// - /// Adds a callback that is called when the Unity method OnApplicationPause - /// is called. - /// - /// - /// Callback. - public static void AddPauseCallback(Action callback) - { - if (!sPauseCallbackList.Contains(callback)) - { - sPauseCallbackList.Add(callback); - } - } - - /// - /// Removes the callback from the list to call when handling OnApplicationPause - /// is called. - /// - /// true, if focus callback was removed, false otherwise. - /// Callback. - public static bool RemovePauseCallback(Action callback) - { - return sPauseCallbackList.Remove(callback); - } - } -} \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs.meta deleted file mode 100644 index fa51c96..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/OurUtils/PlayGamesHelperObject.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 7dd6f93ee6cb54945aea72a87542f720 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms.meta deleted file mode 100644 index dd9d70b..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 58fac82a81a11415b99606841f6040a6 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android.meta deleted file mode 100644 index a8981c4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5c9032ae026414e1bbe872da53708edd -folderAsset: yes -timeCreated: 1441206393 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs deleted file mode 100644 index ec9c53e..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs +++ /dev/null @@ -1,1024 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID -#pragma warning disable 0642 // Possible mistaken empty statement - -namespace GooglePlayGames.Android -{ - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.Events; - using GooglePlayGames.BasicApi.SavedGame; - using GooglePlayGames.OurUtils; - using System; - using UnityEngine; - using UnityEngine.SocialPlatforms; - - public class AndroidClient : IPlayGamesClient - { - private enum AuthState - { - Unauthenticated, - Authenticated - } - - private readonly object GameServicesLock = new object(); - private readonly object AuthStateLock = new object(); - private readonly static String PlayGamesSdkClassName = - "com.google.android.gms.games.PlayGamesSdk"; - - private volatile ISavedGameClient mSavedGameClient; - private volatile IEventsClient mEventsClient; - private volatile Player mUser = null; - private volatile AuthState mAuthState = AuthState.Unauthenticated; - private IUserProfile[] mFriends = new IUserProfile[0]; - private LoadFriendsStatus mLastLoadFriendsStatus = LoadFriendsStatus.Unknown; - - AndroidJavaClass mGamesClass = new AndroidJavaClass("com.google.android.gms.games.PlayGames"); - private static string TasksClassName = "com.google.android.gms.tasks.Tasks"; - - private AndroidJavaObject mFriendsResolutionException = null; - - private readonly int mLeaderboardMaxResults = 25; // can be from 1 to 25 - - private readonly int mFriendsMaxResults = 200; // the maximum load friends page size - - internal AndroidClient() - { - PlayGamesHelperObject.CreateObject(); - InitializeSdk(); - } - - private static void InitializeSdk() { - using (var playGamesSdkClass = new AndroidJavaClass(PlayGamesSdkClassName)) { - playGamesSdkClass.CallStatic("initialize", AndroidHelperFragment.GetActivity()); - } - } - - public void Authenticate(Action callback) - { - Authenticate( /* isAutoSignIn= */ true, callback); - } - - public void ManuallyAuthenticate(Action callback) - { - Authenticate( /* isAutoSignIn= */ false, callback); - } - - private void Authenticate(bool isAutoSignIn, Action callback) - { - callback = AsOnGameThreadCallback(callback); - lock (AuthStateLock) - { - // If the user is already authenticated, just fire the callback, we don't need - // any additional work. - if (mAuthState == AuthState.Authenticated) - { - OurUtils.Logger.d("Already authenticated."); - InvokeCallbackOnGameThread(callback, SignInStatus.Success); - return; - } - } - - string methodName = isAutoSignIn ? "isAuthenticated" : "signIn"; - - OurUtils.Logger.d("Starting Auth using the method " + methodName); - using (var client = getGamesSignInClient()) - using ( - var task = client.Call(methodName)) - { - AndroidTaskUtils.AddOnSuccessListener(task, authenticationResult => - { - bool isAuthenticated = authenticationResult.Call("isAuthenticated"); - SignInOnResult(isAuthenticated, callback); - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("Authentication failed - " + exception.Call("toString")); - callback(SignInStatus.InternalError); - }); - } - } - - private void SignInOnResult(bool isAuthenticated, Action callback) - { - if (isAuthenticated) - { - using (var signInTasks = new AndroidJavaObject("java.util.ArrayList")) - { - AndroidJavaObject taskGetPlayer = - getPlayersClient().Call("getCurrentPlayer"); - signInTasks.Call("add", taskGetPlayer); - - using (var tasks = new AndroidJavaClass(TasksClassName)) - using (var allTask = tasks.CallStatic("whenAll", signInTasks)) - { - AndroidTaskUtils.AddOnCompleteListener( - allTask, - completeTask => - { - if (completeTask.Call("isSuccessful")) - { - using (var resultObject = taskGetPlayer.Call("getResult")) - { - mUser = AndroidJavaConverter.ToPlayer(resultObject); - } - - lock (GameServicesLock) - { - mSavedGameClient = new AndroidSavedGameClient(this); - mEventsClient = new AndroidEventsClient(); - } - - mAuthState = AuthState.Authenticated; - InvokeCallbackOnGameThread(callback, SignInStatus.Success); - OurUtils.Logger.d("Authentication succeeded"); - LoadAchievements(ignore => { }); - } - else - { - if (completeTask.Call("isCanceled")) - { - InvokeCallbackOnGameThread(callback, SignInStatus.Canceled); - return; - } - - using (var exception = completeTask.Call("getException")) - { - OurUtils.Logger.e( - "Authentication failed - " + exception.Call("toString")); - InvokeCallbackOnGameThread(callback, SignInStatus.InternalError); - } - } - } - ); - } - } - } - else - { - lock (AuthStateLock) - { - OurUtils.Logger.e("Returning an error code."); - InvokeCallbackOnGameThread(callback, SignInStatus.Canceled); - } - } - } - - public void RequestServerSideAccess(bool forceRefreshToken, Action callback) - { - callback = AsOnGameThreadCallback(callback); - - if (!GameInfo.WebClientIdInitialized()) - { - throw new InvalidOperationException("Requesting server side access requires web " + - "client id to be configured."); - } - - using (var client = getGamesSignInClient()) - using (var task = client.Call("requestServerSideAccess", - GameInfo.WebClientId, forceRefreshToken)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - authCode => callback(authCode) - ); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("Requesting server side access task failed - " + - exception.Call("toString")); - callback(null); - }); - } - } - - private static Action AsOnGameThreadCallback(Action callback) - { - if (callback == null) - { - return delegate { }; - } - - return result => InvokeCallbackOnGameThread(callback, result); - } - - private static void InvokeCallbackOnGameThread(Action callback) - { - if (callback == null) - { - return; - } - - PlayGamesHelperObject.RunOnGameThread(() => { callback(); }); - } - - private static void InvokeCallbackOnGameThread(Action callback, T data) - { - if (callback == null) - { - return; - } - - PlayGamesHelperObject.RunOnGameThread(() => { callback(data); }); - } - - - private static Action AsOnGameThreadCallback( - Action toInvokeOnGameThread) - { - return (result1, result2) => - { - if (toInvokeOnGameThread == null) - { - return; - } - - PlayGamesHelperObject.RunOnGameThread(() => toInvokeOnGameThread(result1, result2)); - }; - } - - private static void InvokeCallbackOnGameThread(Action callback, T1 t1, T2 t2) - { - if (callback == null) - { - return; - } - - PlayGamesHelperObject.RunOnGameThread(() => { callback(t1, t2); }); - } - - public bool IsAuthenticated() - { - lock (AuthStateLock) - { - return mAuthState == AuthState.Authenticated; - } - } - - public void LoadFriends(Action callback) - { - LoadAllFriends(mFriendsMaxResults, /* forceReload= */ false, /* loadMore= */ false, callback); - } - - private void LoadAllFriends(int pageSize, bool forceReload, bool loadMore, - Action callback) - { - LoadFriendsPaginated(pageSize, loadMore, forceReload, result => - { - mLastLoadFriendsStatus = result; - switch (result) - { - case LoadFriendsStatus.Completed: - InvokeCallbackOnGameThread(callback, true); - break; - case LoadFriendsStatus.LoadMore: - // There are more friends to load. - LoadAllFriends(pageSize, /* forceReload= */ false, /* loadMore= */ true, callback); - break; - case LoadFriendsStatus.ResolutionRequired: - case LoadFriendsStatus.InternalError: - case LoadFriendsStatus.NotAuthorized: - InvokeCallbackOnGameThread(callback, false); - break; - default: - GooglePlayGames.OurUtils.Logger.d("There was an error when loading friends." + result); - InvokeCallbackOnGameThread(callback, false); - break; - } - }); - } - - public void LoadFriends(int pageSize, bool forceReload, - Action callback) - { - LoadFriendsPaginated(pageSize, /* isLoadMore= */ false, /* forceReload= */ forceReload, - callback); - } - - public void LoadMoreFriends(int pageSize, Action callback) - { - LoadFriendsPaginated(pageSize, /* isLoadMore= */ true, /* forceReload= */ false, - callback); - } - - private void LoadFriendsPaginated(int pageSize, bool isLoadMore, bool forceReload, - Action callback) - { - mFriendsResolutionException = null; - using (var playersClient = getPlayersClient()) - using (var task = isLoadMore - ? playersClient.Call("loadMoreFriends", pageSize) - : playersClient.Call("loadFriends", pageSize, - forceReload)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, annotatedData => - { - using (var playersBuffer = annotatedData.Call("get")) - { - AndroidJavaObject metadata = playersBuffer.Call("getMetadata"); - var areMoreFriendsToLoad = metadata != null && - metadata.Call("getString", - "next_page_token") != null; - mFriends = AndroidJavaConverter.playersBufferToArray(playersBuffer); - mLastLoadFriendsStatus = areMoreFriendsToLoad - ? LoadFriendsStatus.LoadMore - : LoadFriendsStatus.Completed; - InvokeCallbackOnGameThread(callback, mLastLoadFriendsStatus); - } - }); - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - AndroidHelperFragment.IsResolutionRequired(exception, resolutionRequired => - { - if (resolutionRequired) - { - mFriendsResolutionException = - exception.Call("getResolution"); - mLastLoadFriendsStatus = LoadFriendsStatus.ResolutionRequired; - mFriends = new IUserProfile[0]; - InvokeCallbackOnGameThread(callback, LoadFriendsStatus.ResolutionRequired); - } - else - { - mFriendsResolutionException = null; - - if (IsApiException(exception)) - { - var statusCode = exception.Call("getStatusCode"); - if (statusCode == /* GamesClientStatusCodes.NETWORK_ERROR_NO_DATA */ 26504) - { - mLastLoadFriendsStatus = LoadFriendsStatus.NetworkError; - InvokeCallbackOnGameThread(callback, LoadFriendsStatus.NetworkError); - return; - } - } - - mLastLoadFriendsStatus = LoadFriendsStatus.InternalError; - OurUtils.Logger.e("LoadFriends failed: " + - exception.Call("toString")); - InvokeCallbackOnGameThread(callback, LoadFriendsStatus.InternalError); - } - }); - return; - }); - } - } - - private static bool IsApiException(AndroidJavaObject exception) { - var exceptionClassName = exception.Call("getClass") - .Call("getName"); - return exceptionClassName == "com.google.android.gms.common.api.ApiException"; - } - - public LoadFriendsStatus GetLastLoadFriendsStatus() - { - return mLastLoadFriendsStatus; - } - - public void AskForLoadFriendsResolution(Action callback) - { - if (mFriendsResolutionException == null) - { - GooglePlayGames.OurUtils.Logger.d("The developer asked for access to the friends " + - "list but there is no intent to trigger the UI. This may be because the user " + - "has granted access already or the game has not called loadFriends() before."); - using (var playersClient = getPlayersClient()) - using ( - var task = playersClient.Call("loadFriends", /* pageSize= */ 1, - /* forceReload= */ false)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, annotatedData => { InvokeCallbackOnGameThread(callback, UIStatus.Valid); }); - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - AndroidHelperFragment.IsResolutionRequired(exception, resolutionRequired => - { - if (resolutionRequired) - { - mFriendsResolutionException = - exception.Call("getResolution"); - AndroidHelperFragment.AskForLoadFriendsResolution( - mFriendsResolutionException, AsOnGameThreadCallback(callback)); - return; - } - - if (IsApiException(exception)) - { - var statusCode = exception.Call("getStatusCode"); - if (statusCode == - /* GamesClientStatusCodes.NETWORK_ERROR_NO_DATA */ 26504) - { - InvokeCallbackOnGameThread(callback, UIStatus.NetworkError); - return; - } - } - - OurUtils.Logger.e("LoadFriends failed: " + - exception.Call("toString")); - InvokeCallbackOnGameThread(callback, UIStatus.InternalError); - }); - }); - } - } - else - { - AndroidHelperFragment.AskForLoadFriendsResolution(mFriendsResolutionException, - AsOnGameThreadCallback(callback)); - } - } - - public void ShowCompareProfileWithAlternativeNameHintsUI(string playerId, - string otherPlayerInGameName, - string currentPlayerInGameName, - Action callback) - { - AndroidHelperFragment.ShowCompareProfileWithAlternativeNameHintsUI( - playerId, otherPlayerInGameName, currentPlayerInGameName, - AsOnGameThreadCallback(callback)); - } - - public void GetFriendsListVisibility(bool forceReload, - Action callback) - { - using (var playersClient = getPlayersClient()) - using ( - var task = playersClient.Call("getCurrentPlayer", forceReload)) - { - AndroidTaskUtils.AddOnSuccessListener(task, annotatedData => - { - AndroidJavaObject currentPlayerInfo = - annotatedData.Call("get").Call( - "getCurrentPlayerInfo"); - int playerListVisibility = - currentPlayerInfo.Call("getFriendsListVisibilityStatus"); - InvokeCallbackOnGameThread(callback, - AndroidJavaConverter.ToFriendsListVisibilityStatus(playerListVisibility)); - }); - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - InvokeCallbackOnGameThread(callback, FriendsListVisibilityStatus.NetworkError); - return; - }); - } - } - - public IUserProfile[] GetFriends() - { - return mFriends; - } - - public string GetUserId() - { - if (mUser == null) - { - return null; - } - - return mUser.id; - } - - public string GetUserDisplayName() - { - if (mUser == null) - { - return null; - } - - return mUser.userName; - } - - public string GetUserImageUrl() - { - if (mUser == null) - { - return null; - } - - return mUser.AvatarURL; - } - - public void GetPlayerStats(Action callback) - { - using (var playerStatsClient = getPlayerStatsClient()) - using (var task = playerStatsClient.Call("loadPlayerStats", /* forceReload= */ false)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var playerStatsJava = annotatedData.Call("get")) - { - int numberOfPurchases = playerStatsJava.Call("getNumberOfPurchases"); - float avgSessionLength = playerStatsJava.Call("getAverageSessionLength"); - int daysSinceLastPlayed = playerStatsJava.Call("getDaysSinceLastPlayed"); - int numberOfSessions = playerStatsJava.Call("getNumberOfSessions"); - float sessionPercentile = playerStatsJava.Call("getSessionPercentile"); - float spendPercentile = playerStatsJava.Call("getSpendPercentile"); - float spendProbability = playerStatsJava.Call("getSpendProbability"); - float churnProbability = playerStatsJava.Call("getChurnProbability"); - float highSpenderProbability = playerStatsJava.Call("getHighSpenderProbability"); - float totalSpendNext28Days = playerStatsJava.Call("getTotalSpendNext28Days"); - - PlayerStats result = new PlayerStats( - numberOfPurchases, - avgSessionLength, - daysSinceLastPlayed, - numberOfSessions, - sessionPercentile, - spendPercentile, - spendProbability, - churnProbability, - highSpenderProbability, - totalSpendNext28Days); - - InvokeCallbackOnGameThread(callback, CommonStatusCodes.Success, result); - } - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("GetPlayerStats failed: " + exception.Call("toString")); - var statusCode = IsAuthenticated() - ? CommonStatusCodes.InternalError - : CommonStatusCodes.SignInRequired; - InvokeCallbackOnGameThread(callback, statusCode, new PlayerStats()); - }); - } - } - - public void LoadUsers(string[] userIds, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, new IUserProfile[0]); - return; - } - - using (var playersClient = getPlayersClient()) - { - object countLock = new object(); - int count = userIds.Length; - int resultCount = 0; - IUserProfile[] users = new IUserProfile[count]; - for (int i = 0; i < count; ++i) - { - using (var task = playersClient.Call("loadPlayer", userIds[i])) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var player = annotatedData.Call("get")) - { - string playerId = player.Call("getPlayerId"); - for (int j = 0; j < count; ++j) - { - if (playerId == userIds[j]) - { - users[j] = AndroidJavaConverter.ToPlayer(player); - break; - } - } - - lock (countLock) - { - ++resultCount; - if (resultCount == count) - { - InvokeCallbackOnGameThread(callback, users); - } - } - } - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("LoadUsers failed for index " + i + - " with: " + exception.Call("toString")); - lock (countLock) - { - ++resultCount; - if (resultCount == count) - { - InvokeCallbackOnGameThread(callback, users); - } - } - }); - } - } - } - } - - public void LoadAchievements(Action callback) - { - using (var achievementsClient = getAchievementsClient()) - using (var task = achievementsClient.Call("load", /* forceReload= */ false)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var achievementBuffer = annotatedData.Call("get")) - { - int count = achievementBuffer.Call("getCount"); - Achievement[] result = new Achievement[count]; - for (int i = 0; i < count; ++i) - { - Achievement achievement = new Achievement(); - using (var javaAchievement = achievementBuffer.Call("get", i)) - { - achievement.Id = javaAchievement.Call("getAchievementId"); - achievement.Description = javaAchievement.Call("getDescription"); - achievement.Name = javaAchievement.Call("getName"); - achievement.Points = javaAchievement.Call("getXpValue"); - - long timestamp = javaAchievement.Call("getLastUpdatedTimestamp"); - achievement.LastModifiedTime = AndroidJavaConverter.ToDateTime(timestamp); - - achievement.RevealedImageUrl = javaAchievement.Call("getRevealedImageUrl"); - achievement.UnlockedImageUrl = javaAchievement.Call("getUnlockedImageUrl"); - achievement.IsIncremental = - javaAchievement.Call("getType") == 1 /* TYPE_INCREMENTAL */; - if (achievement.IsIncremental) - { - achievement.CurrentSteps = javaAchievement.Call("getCurrentSteps"); - achievement.TotalSteps = javaAchievement.Call("getTotalSteps"); - } - - int state = javaAchievement.Call("getState"); - achievement.IsUnlocked = state == 0 /* STATE_UNLOCKED */; - achievement.IsRevealed = state == 1 /* STATE_REVEALED */; - } - - result[i] = achievement; - } - - achievementBuffer.Call("release"); - InvokeCallbackOnGameThread(callback, result); - } - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("LoadAchievements failed: " + exception.Call("toString")); - InvokeCallbackOnGameThread(callback, new Achievement[0]); - }); - } - } - - public void UnlockAchievement(string achId, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - return; - } - - using (var achievementsClient = getAchievementsClient()) - { - achievementsClient.Call("unlock", achId); - InvokeCallbackOnGameThread(callback, true); - } - } - - public void RevealAchievement(string achId, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - return; - } - - using (var achievementsClient = getAchievementsClient()) - { - achievementsClient.Call("reveal", achId); - InvokeCallbackOnGameThread(callback, true); - } - } - - public void IncrementAchievement(string achId, int steps, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - return; - } - - using (var achievementsClient = getAchievementsClient()) - { - achievementsClient.Call("increment", achId, steps); - InvokeCallbackOnGameThread(callback, true); - } - } - - public void SetStepsAtLeast(string achId, int steps, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - return; - } - - using (var achievementsClient = getAchievementsClient()) - { - achievementsClient.Call("setSteps", achId, steps); - InvokeCallbackOnGameThread(callback, true); - } - } - - public void ShowAchievementsUI(Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, UIStatus.NotAuthorized); - return; - } - - AndroidHelperFragment.ShowAchievementsUI(AsOnGameThreadCallback(callback)); - } - - public int LeaderboardMaxResults() - { - return mLeaderboardMaxResults; - } - - public void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, UIStatus.NotAuthorized); - return; - } - - if (leaderboardId == null) - { - AndroidHelperFragment.ShowAllLeaderboardsUI(AsOnGameThreadCallback(callback)); - } - else - { - AndroidHelperFragment.ShowLeaderboardUI(leaderboardId, span, - AsOnGameThreadCallback(callback)); - } - } - - public void LoadScores(string leaderboardId, LeaderboardStart start, - int rowCount, LeaderboardCollection collection, - LeaderboardTimeSpan timeSpan, - Action callback) - { - using (var client = getLeaderboardsClient()) - { - string loadScoresMethod = - start == LeaderboardStart.TopScores ? "loadTopScores" : "loadPlayerCenteredScores"; - using (var task = client.Call( - loadScoresMethod, - leaderboardId, - AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan), - AndroidJavaConverter.ToLeaderboardVariantCollection(collection), - rowCount)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var leaderboardScores = annotatedData.Call("get")) - { - InvokeCallbackOnGameThread(callback, CreateLeaderboardScoreData( - leaderboardId, - collection, - timeSpan, - annotatedData.Call("isStale") - ? ResponseStatus.SuccessWithStale - : ResponseStatus.Success, - leaderboardScores)); - leaderboardScores.Call("release"); - } - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - AndroidHelperFragment.IsResolutionRequired( - exception, resolutionRequired => - { - if (resolutionRequired) - { - mFriendsResolutionException = exception.Call( - "getResolution"); - InvokeCallbackOnGameThread( - callback, new LeaderboardScoreData(leaderboardId, - ResponseStatus.ResolutionRequired)); - } - else - { - mFriendsResolutionException = null; - } - }); - OurUtils.Logger.e("LoadScores failed: " + exception.Call("toString")); - InvokeCallbackOnGameThread( - callback, new LeaderboardScoreData(leaderboardId, - ResponseStatus.InternalError)); - }); - } - } - } - - public void LoadMoreScores(ScorePageToken token, int rowCount, - Action callback) - { - using (var client = getLeaderboardsClient()) - using (var task = client.Call("loadMoreScores", - token.InternalObject, rowCount, AndroidJavaConverter.ToPageDirection(token.Direction))) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var leaderboardScores = annotatedData.Call("get")) - { - InvokeCallbackOnGameThread(callback, CreateLeaderboardScoreData( - token.LeaderboardId, - token.Collection, - token.TimeSpan, - annotatedData.Call("isStale") - ? ResponseStatus.SuccessWithStale - : ResponseStatus.Success, - leaderboardScores)); - leaderboardScores.Call("release"); - } - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - AndroidHelperFragment.IsResolutionRequired(exception, resolutionRequired => - { - if (resolutionRequired) - { - mFriendsResolutionException = - exception.Call("getResolution"); - InvokeCallbackOnGameThread( - callback, new LeaderboardScoreData(token.LeaderboardId, - ResponseStatus.ResolutionRequired)); - } - else - { - mFriendsResolutionException = null; - } - }); - OurUtils.Logger.e("LoadMoreScores failed: " + exception.Call("toString")); - InvokeCallbackOnGameThread( - callback, new LeaderboardScoreData(token.LeaderboardId, - ResponseStatus.InternalError)); - }); - } - } - - private LeaderboardScoreData CreateLeaderboardScoreData( - string leaderboardId, - LeaderboardCollection collection, - LeaderboardTimeSpan timespan, - ResponseStatus status, - AndroidJavaObject leaderboardScoresJava) - { - LeaderboardScoreData leaderboardScoreData = new LeaderboardScoreData(leaderboardId, status); - var scoresBuffer = leaderboardScoresJava.Call("getScores"); - int count = scoresBuffer.Call("getCount"); - for (int i = 0; i < count; ++i) - { - using (var leaderboardScore = scoresBuffer.Call("get", i)) - { - long timestamp = leaderboardScore.Call("getTimestampMillis"); - System.DateTime date = AndroidJavaConverter.ToDateTime(timestamp); - - ulong rank = (ulong) leaderboardScore.Call("getRank"); - string scoreHolderId = ""; - using (var scoreHolder = leaderboardScore.Call("getScoreHolder")) - { - scoreHolderId = scoreHolder.Call("getPlayerId"); - } - - ulong score = (ulong) leaderboardScore.Call("getRawScore"); - string metadata = leaderboardScore.Call("getScoreTag"); - - leaderboardScoreData.AddScore(new PlayGamesScore(date, leaderboardId, - rank, scoreHolderId, score, metadata)); - } - } - - leaderboardScoreData.NextPageToken = new ScorePageToken(scoresBuffer, leaderboardId, collection, - timespan, ScorePageDirection.Forward); - leaderboardScoreData.PrevPageToken = new ScorePageToken(scoresBuffer, leaderboardId, collection, - timespan, ScorePageDirection.Backward); - - using (var leaderboard = leaderboardScoresJava.Call("getLeaderboard")) - using (var variants = leaderboard.Call("getVariants")) - using (var variant = variants.Call("get", 0)) - { - leaderboardScoreData.Title = leaderboard.Call("getDisplayName"); - if (variant.Call("hasPlayerInfo")) - { - System.DateTime date = AndroidJavaConverter.ToDateTime(0); - ulong rank = (ulong) variant.Call("getPlayerRank"); - ulong score = (ulong) variant.Call("getRawPlayerScore"); - string metadata = variant.Call("getPlayerScoreTag"); - leaderboardScoreData.PlayerScore = new PlayGamesScore(date, leaderboardId, - rank, mUser.id, score, metadata); - } - - leaderboardScoreData.ApproximateCount = (ulong) variant.Call("getNumScores"); - } - - return leaderboardScoreData; - } - - public void SubmitScore(string leaderboardId, long score, Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - } - - using (var client = getLeaderboardsClient()) - { - client.Call("submitScore", leaderboardId, score); - InvokeCallbackOnGameThread(callback, true); - } - } - - public void SubmitScore(string leaderboardId, long score, string metadata, - Action callback) - { - if (!IsAuthenticated()) - { - InvokeCallbackOnGameThread(callback, false); - } - - using (var client = getLeaderboardsClient()) - { - client.Call("submitScore", leaderboardId, score, metadata); - InvokeCallbackOnGameThread(callback, true); - } - } - - public ISavedGameClient GetSavedGameClient() - { - lock (GameServicesLock) - { - return mSavedGameClient; - } - } - - public IEventsClient GetEventsClient() - { - lock (GameServicesLock) - { - return mEventsClient; - } - } - - private AndroidJavaObject getAchievementsClient() - { - return mGamesClass.CallStatic("getAchievementsClient", - AndroidHelperFragment.GetActivity()); - } - - private AndroidJavaObject getPlayersClient() - { - return mGamesClass.CallStatic("getPlayersClient", AndroidHelperFragment.GetActivity()); - } - - private AndroidJavaObject getLeaderboardsClient() - { - return mGamesClass.CallStatic("getLeaderboardsClient", - AndroidHelperFragment.GetActivity()); - } - - private AndroidJavaObject getPlayerStatsClient() - { - return mGamesClass.CallStatic("getPlayerStatsClient", - AndroidHelperFragment.GetActivity()); - } - - private AndroidJavaObject getGamesSignInClient() - { - return mGamesClass.CallStatic("getGamesSignInClient", - AndroidHelperFragment.GetActivity()); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs.meta deleted file mode 100644 index 22bce66..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 32e99ad5da22248a28a9ca51282b121f -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs deleted file mode 100644 index 799205d..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs +++ /dev/null @@ -1,136 +0,0 @@ -#if UNITY_ANDROID -namespace GooglePlayGames.Android -{ - using System; - using System.Collections.Generic; - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.Events; - using GooglePlayGames.OurUtils; - using UnityEngine; - internal class AndroidEventsClient : IEventsClient - { - private volatile AndroidJavaObject mEventsClient; - - public AndroidEventsClient() - { - using (var gamesClass = new AndroidJavaClass("com.google.android.gms.games.PlayGames")) - { - mEventsClient = gamesClass.CallStatic("getEventsClient", - AndroidHelperFragment.GetActivity()); - } - } - - public void FetchAllEvents(DataSource source, Action> callback) - { - callback = ToOnGameThread(callback); - using (var task = - mEventsClient.Call("load", source == DataSource.ReadNetworkOnly ? true : false)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var buffer = annotatedData.Call("get")) - { - int count = buffer.Call("getCount"); - List result = new List(); - for (int i = 0; i < count; ++i) - { - using (var eventJava = buffer.Call("get", i)) - { - result.Add(CreateEvent(eventJava)); - } - } - buffer.Call("release"); - callback.Invoke( - annotatedData.Call("isStale") - ? ResponseStatus.SuccessWithStale - : ResponseStatus.Success, - result - ); - } - }); - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - Debug.Log("FetchAllEvents failed"); - callback.Invoke(ResponseStatus.InternalError, null); - }); - } - } - - public void FetchEvent(DataSource source, string eventId, Action callback) - { - callback = ToOnGameThread(callback); - string[] ids = new string[1]; - ids[0] = eventId; - using (var task = mEventsClient.Call("loadByIds", - source == DataSource.ReadNetworkOnly ? true : false, ids)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var buffer = annotatedData.Call("get")) - { - int count = buffer.Call("getCount"); - if (count > 0) - { - using (var eventJava = buffer.Call("get", 0)) - { - callback.Invoke( - annotatedData.Call("isStale") - ? ResponseStatus.SuccessWithStale - : ResponseStatus.Success, - CreateEvent(eventJava) - ); - } - } - else - { - callback.Invoke( - annotatedData.Call("isStale") - ? ResponseStatus.SuccessWithStale - : ResponseStatus.Success, - null - ); - } - buffer.Call("release"); - } - }); - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - Debug.Log("FetchEvent failed"); - callback.Invoke(ResponseStatus.InternalError, null); - }); - } - } - - public void IncrementEvent(string eventId, uint stepsToIncrement) - { - mEventsClient.Call("increment", eventId, (int) stepsToIncrement); - } - - private static Action ToOnGameThread(Action toConvert) - { - return (val1, val2) => PlayGamesHelperObject.RunOnGameThread(() => toConvert(val1, val2)); - } - - private static BasicApi.Events.Event CreateEvent(AndroidJavaObject eventJava) - { - string id = eventJava.Call("getEventId"); - string name = eventJava.Call("getName"); - string description = eventJava.Call("getDescription"); - string imageUrl = eventJava.Call("getIconImageUrl"); - ulong currentCount = (ulong) eventJava.Call("getValue"); - EventVisibility visibility = eventJava.Call("isVisible") - ? EventVisibility.Revealed - : EventVisibility.Hidden; - return new BasicApi.Events.Event(id, name, description, imageUrl, currentCount, visibility); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs.meta deleted file mode 100644 index c614c38..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidEventsClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 311e1761661a341bebebd422a144b5e8 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs deleted file mode 100644 index 4b770e1..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs +++ /dev/null @@ -1,223 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID -namespace GooglePlayGames.Android -{ - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.SavedGame; - using OurUtils; - using UnityEngine; - using System; - using System.Collections.Generic; - - internal class AndroidHelperFragment - { - private const string HelperFragmentClass = "com.google.games.bridge.HelperFragment"; - - public static AndroidJavaObject GetActivity() - { - using (var jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) - { - return jc.GetStatic("currentActivity"); - } - } - - public static AndroidJavaObject GetDefaultPopupView() - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using (var activity = AndroidHelperFragment.GetActivity()) - { - return helperFragment.CallStatic("getDecorView", activity); - } - } - - public static void ShowAchievementsUI(Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using (var task = - helperFragment.CallStatic("showAchievementUi", AndroidHelperFragment.GetActivity())) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - uiCode => - { - OurUtils.Logger.d("ShowAchievementsUI result " + uiCode); - cb.Invoke((UIStatus) uiCode); - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - OurUtils.Logger.e("ShowAchievementsUI failed with exception"); - cb.Invoke(UIStatus.InternalError); - }); - } - } - - public static void ShowCaptureOverlayUI() - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - { - helperFragment.CallStatic("showCaptureOverlayUi", AndroidHelperFragment.GetActivity()); - } - } - - public static void ShowAllLeaderboardsUI(Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using (var task = - helperFragment.CallStatic("showAllLeaderboardsUi", - AndroidHelperFragment.GetActivity())) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - uiCode => - { - OurUtils.Logger.d("ShowAllLeaderboardsUI result " + uiCode); - cb.Invoke((UIStatus) uiCode); - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - OurUtils.Logger.e("ShowAllLeaderboardsUI failed with exception"); - cb.Invoke(UIStatus.InternalError); - }); - } - } - - public static void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan timeSpan, Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using (var task = helperFragment.CallStatic("showLeaderboardUi", - AndroidHelperFragment.GetActivity(), leaderboardId, - AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan))) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - uiCode => - { - OurUtils.Logger.d("ShowLeaderboardUI result " + uiCode); - cb.Invoke((UIStatus) uiCode); - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - OurUtils.Logger.e("ShowLeaderboardUI failed with exception"); - cb.Invoke(UIStatus.InternalError); - }); - } - } - - public static void ShowCompareProfileWithAlternativeNameHintsUI( - string playerId, string otherPlayerInGameName, string currentPlayerInGameName, - Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using ( - var task = helperFragment.CallStatic( - "showCompareProfileWithAlternativeNameHintsUI", - AndroidHelperFragment.GetActivity(), playerId, otherPlayerInGameName, - currentPlayerInGameName)) - { - AndroidTaskUtils.AddOnSuccessListener(task, uiCode => - { - OurUtils.Logger.d("ShowCompareProfileWithAlternativeNameHintsUI result " + uiCode); - cb.Invoke((UIStatus) uiCode); - }); - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("ShowCompareProfileWithAlternativeNameHintsUI failed with exception"); - cb.Invoke(UIStatus.InternalError); - }); - } - } - - public static void IsResolutionRequired( - AndroidJavaObject friendsSharingConsentException, Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - { - var isResolutionRequired = helperFragment.CallStatic( - "isResolutionRequired", friendsSharingConsentException); - cb.Invoke(isResolutionRequired); - } - } - - public static void AskForLoadFriendsResolution( - AndroidJavaObject friendsSharingConsentException, Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using ( - var task = helperFragment.CallStatic( - "askForLoadFriendsResolution", AndroidHelperFragment.GetActivity(), - friendsSharingConsentException)) - { - AndroidTaskUtils.AddOnSuccessListener(task, uiCode => - { - OurUtils.Logger.d("AskForLoadFriendsResolution result " + uiCode); - cb.Invoke((UIStatus) uiCode); - }); - - AndroidTaskUtils.AddOnFailureListener(task, exception => - { - OurUtils.Logger.e("AskForLoadFriendsResolution failed with exception"); - cb.Invoke(UIStatus.InternalError); - }); - } - } - - public static void ShowSelectSnapshotUI(bool showCreateSaveUI, bool showDeleteSaveUI, - int maxDisplayedSavedGames, string uiTitle, Action cb) - { - using (var helperFragment = new AndroidJavaClass(HelperFragmentClass)) - using (var task = helperFragment.CallStatic("showSelectSnapshotUi", - AndroidHelperFragment.GetActivity(), uiTitle, showCreateSaveUI, showDeleteSaveUI, - maxDisplayedSavedGames)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - result => - { - SelectUIStatus status = (SelectUIStatus) result.Get("status"); - OurUtils.Logger.d("ShowSelectSnapshotUI result " + status); - - AndroidJavaObject javaMetadata = result.Get("metadata"); - AndroidSnapshotMetadata metadata = - javaMetadata == null - ? null - : new AndroidSnapshotMetadata(javaMetadata, /* contents= */null); - - cb.Invoke(status, metadata); - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - OurUtils.Logger.e("ShowSelectSnapshotUI failed with exception"); - cb.Invoke(SelectUIStatus.InternalError, null); - }); - } - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs.meta deleted file mode 100644 index e3c70f4..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidHelperFragment.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 6eb353a6ffa554bacb374cfaf0cc45e7 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs deleted file mode 100644 index f4bd067..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID -namespace GooglePlayGames.Android -{ - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.SavedGame; - using OurUtils; - using UnityEngine; - using UnityEngine.SocialPlatforms; - using System; - using System.Collections.Generic; - - internal class AndroidJavaConverter - { - internal static System.DateTime ToDateTime(long milliseconds) - { - System.DateTime result = new System.DateTime(1970, 1, 1, 0, 0, 0, 0); - return result.AddMilliseconds(milliseconds); - } - - // Convert to LeaderboardVariant.java#TimeSpan - internal static int ToLeaderboardVariantTimeSpan(LeaderboardTimeSpan span) - { - switch (span) - { - case LeaderboardTimeSpan.Daily: - return 0 /* TIME_SPAN_DAILY */; - case LeaderboardTimeSpan.Weekly: - return 1 /* TIME_SPAN_WEEKLY */; - case LeaderboardTimeSpan.AllTime: - default: - return 2 /* TIME_SPAN_ALL_TIME */; - } - } - - // Convert to LeaderboardVariant.java#Collection - internal static int ToLeaderboardVariantCollection(LeaderboardCollection collection) - { - switch (collection) - { - case LeaderboardCollection.Social: - return 3 /* COLLECTION_FRIENDS */; - case LeaderboardCollection.Public: - default: - return 0 /* COLLECTION_PUBLIC */; - } - } - - // Convert to PageDirection.java#Direction - internal static int ToPageDirection(ScorePageDirection direction) - { - switch (direction) - { - case ScorePageDirection.Forward: - return 0 /* NEXT */; - case ScorePageDirection.Backward: - return 1 /* PREV */; - default: - return -1 /* NONE */; - } - } - - internal static Player ToPlayer(AndroidJavaObject player) - { - if (player == null) - { - return null; - } - - string displayName = player.Call("getDisplayName"); - string playerId = player.Call("getPlayerId"); - string avatarUrl = player.Call("getIconImageUrl"); - return new Player(displayName, playerId, avatarUrl); - } - - internal static PlayerProfile ToPlayerProfile(AndroidJavaObject player) { - if (player == null) { - return null; - } - - string displayName = player.Call("getDisplayName"); - string playerId = player.Call("getPlayerId"); - string avatarUrl = player.Call("getIconImageUrl"); - bool isFriend = - player.Call("getRelationshipInfo").Call("getFriendStatus") == - 4 /* PlayerFriendStatus.Friend*/; - return new PlayerProfile(displayName, playerId, avatarUrl, isFriend); - } - - internal static List ToStringList(AndroidJavaObject stringList) - { - if (stringList == null) - { - return new List(); - } - - int size = stringList.Call("size"); - List converted = new List(size); - - for (int i = 0; i < size; i++) - { - converted.Add(stringList.Call("get", i)); - } - - return converted; - } - - // from C#: List to Java: ArrayList - internal static AndroidJavaObject ToJavaStringList(List list) - { - AndroidJavaObject converted = new AndroidJavaObject("java.util.ArrayList"); - for (int i = 0; i < list.Count; i++) - { - converted.Call("add", list[i]); - } - - return converted; - } - - internal static FriendsListVisibilityStatus ToFriendsListVisibilityStatus(int playerListVisibility) { - switch (playerListVisibility) - { - case /* FriendsListVisibilityStatus.UNKNOWN */ 0: - return FriendsListVisibilityStatus.Unknown; - case /* FriendsListVisibilityStatus.VISIBLE */ 1: - return FriendsListVisibilityStatus.Visible; - case /* FriendsListVisibilityStatus.REQUEST_REQUIRED */ 2: - return FriendsListVisibilityStatus.ResolutionRequired; - case /* FriendsListVisibilityStatus.FEATURE_UNAVAILABLE */ 3: - return FriendsListVisibilityStatus.Unavailable; - default: - return FriendsListVisibilityStatus.Unknown; - } - } - - internal static IUserProfile[] playersBufferToArray(AndroidJavaObject playersBuffer) { - int count = playersBuffer.Call("getCount"); - IUserProfile[] users = new IUserProfile[count]; - for (int i = 0; i < count; ++i) { - using (var player = playersBuffer.Call("get", i)) { - users[i] = AndroidJavaConverter.ToPlayerProfile(player); - } - } - - playersBuffer.Call("release"); - return users; - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs.meta deleted file mode 100644 index 5e0d641..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidJavaConverter.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: d498c17d61b504b4f984a99b4542d02f -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs deleted file mode 100644 index 654488c..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs +++ /dev/null @@ -1,443 +0,0 @@ -#if UNITY_ANDROID -#pragma warning disable 0642 // Possible mistaken empty statement - -namespace GooglePlayGames.Android -{ - using System; - using System.Collections.Generic; - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.Nearby; - using GooglePlayGames.OurUtils; - using UnityEngine; - - public class AndroidNearbyConnectionClient : INearbyConnectionClient - { - private volatile AndroidJavaObject mClient; - private readonly static long NearbyClientId = 0L; - private readonly static int ApplicationInfoFlags = 0x00000080; - private readonly static string ServiceId = ReadServiceId(); - protected IMessageListener mAdvertisingMessageListener; - - public AndroidNearbyConnectionClient() - { - PlayGamesHelperObject.CreateObject(); - NearbyHelperObject.CreateObject(this); - using (var nearbyClass = new AndroidJavaClass("com.google.android.gms.nearby.Nearby")) - { - mClient = nearbyClass.CallStatic("getConnectionsClient", - AndroidHelperFragment.GetActivity()); - } - } - - public int MaxUnreliableMessagePayloadLength() - { - return NearbyConnectionConfiguration.MaxUnreliableMessagePayloadLength; - } - - public int MaxReliableMessagePayloadLength() - { - return NearbyConnectionConfiguration.MaxReliableMessagePayloadLength; - } - - public void SendReliable(List recipientEndpointIds, byte[] payload) - { - InternalSend(recipientEndpointIds, payload); - } - - public void SendUnreliable(List recipientEndpointIds, byte[] payload) - { - InternalSend(recipientEndpointIds, payload); - } - - private void InternalSend(List recipientEndpointIds, byte[] payload) - { - Misc.CheckNotNull(recipientEndpointIds); - Misc.CheckNotNull(payload); - - using (var payloadClass = new AndroidJavaClass("com.google.android.gms.nearby.connection.Payload")) - using (var payloadObject = payloadClass.CallStatic("fromBytes", payload)) - using (var task = mClient.Call("sendPayload", - AndroidJavaConverter.ToJavaStringList(recipientEndpointIds), - payloadObject)) - ; - } - - public void StartAdvertising(string name, List appIdentifiers, - TimeSpan? advertisingDuration, Action resultCallback, - Action connectionRequestCallback) - { - Misc.CheckNotNull(resultCallback, "resultCallback"); - Misc.CheckNotNull(connectionRequestCallback, "connectionRequestCallback"); - - if (advertisingDuration.HasValue && advertisingDuration.Value.Ticks < 0) - { - throw new InvalidOperationException("advertisingDuration must be positive"); - } - - connectionRequestCallback = ToOnGameThread(connectionRequestCallback); - resultCallback = ToOnGameThread(resultCallback); - - AdvertisingConnectionLifecycleCallbackProxy callbackProxy = - new AdvertisingConnectionLifecycleCallbackProxy(resultCallback, connectionRequestCallback, this); - using (var connectionLifecycleCallback = - new AndroidJavaObject("com.google.games.bridge.ConnectionLifecycleCallbackProxy", callbackProxy)) - using (var advertisingOptions = CreateAdvertisingOptions()) - using (var task = mClient.Call("startAdvertising", name, GetServiceId(), - connectionLifecycleCallback, advertisingOptions)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - v => NearbyHelperObject.StartAdvertisingTimer(advertisingDuration) - ); - } - } - - private AndroidJavaObject CreateAdvertisingOptions() - { - using (var strategy = new AndroidJavaClass("com.google.android.gms.nearby.connection.Strategy") - .GetStatic("P2P_CLUSTER")) - using (var builder = - new AndroidJavaObject("com.google.android.gms.nearby.connection.AdvertisingOptions$Builder")) - using (builder.Call("setStrategy", strategy)) - { - return builder.Call("build"); - } - } - - private class AdvertisingConnectionLifecycleCallbackProxy : AndroidJavaProxy - { - private Action mResultCallback; - private Action mConnectionRequestCallback; - private AndroidNearbyConnectionClient mClient; - private string mLocalEndpointName; - - public AdvertisingConnectionLifecycleCallbackProxy(Action resultCallback, - Action connectionRequestCallback, AndroidNearbyConnectionClient client) : base( - "com/google/games/bridge/ConnectionLifecycleCallbackProxy$Callback") - { - mResultCallback = resultCallback; - mConnectionRequestCallback = connectionRequestCallback; - mClient = client; - } - - public void onConnectionInitiated(string endpointId, AndroidJavaObject connectionInfo) - { - mLocalEndpointName = connectionInfo.Call("getEndpointName"); - mConnectionRequestCallback(new ConnectionRequest(endpointId, mLocalEndpointName, mClient.GetServiceId(), - new byte[0])); - } - - public void onConnectionResult(string endpointId, AndroidJavaObject connectionResolution) - { - int statusCode; - using (var status = connectionResolution.Call("getStatus")) - { - statusCode = status.Call("getStatusCode"); - } - - if (statusCode == 0) // STATUS_OK - { - mResultCallback(new AdvertisingResult(ResponseStatus.Success, mLocalEndpointName)); - return; - } - - if (statusCode == 8001) // STATUS_ALREADY_ADVERTISING - { - mResultCallback(new AdvertisingResult(ResponseStatus.NotAuthorized, mLocalEndpointName)); - return; - } - - mResultCallback(new AdvertisingResult(ResponseStatus.InternalError, mLocalEndpointName)); - } - - public void onDisconnected(string endpointId) - { - if (mClient.mAdvertisingMessageListener != null) - { - mClient.mAdvertisingMessageListener.OnRemoteEndpointDisconnected(endpointId); - } - } - } - - public void StopAdvertising() - { - mClient.Call("stopAdvertising"); - mAdvertisingMessageListener = null; - } - - public void SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, - Action responseCallback, IMessageListener listener) - { - Misc.CheckNotNull(listener, "listener"); - var listenerOnGameThread = new OnGameThreadMessageListener(listener); - DiscoveringConnectionLifecycleCallback cb = - new DiscoveringConnectionLifecycleCallback(responseCallback, listenerOnGameThread, mClient); - using (var connectionLifecycleCallback = - new AndroidJavaObject("com.google.games.bridge.ConnectionLifecycleCallbackProxy", cb)) - using (mClient.Call("requestConnection", name, remoteEndpointId, - connectionLifecycleCallback)) - ; - } - - public void AcceptConnectionRequest(string remoteEndpointId, byte[] payload, IMessageListener listener) - { - Misc.CheckNotNull(listener, "listener"); - mAdvertisingMessageListener = new OnGameThreadMessageListener(listener); - - using (var payloadCallback = new AndroidJavaObject("com.google.games.bridge.PayloadCallbackProxy", - new PayloadCallback(listener))) - using (mClient.Call("acceptConnection", remoteEndpointId, payloadCallback)) - ; - } - - private class PayloadCallback : AndroidJavaProxy - { - private IMessageListener mListener; - - public PayloadCallback(IMessageListener listener) : base( - "com/google/games/bridge/PayloadCallbackProxy$Callback") - { - mListener = listener; - } - - public void onPayloadReceived(String endpointId, AndroidJavaObject payload) - { - if (payload.Call("getType") != 1) // 1 for BYTES - { - return; - } - - mListener.OnMessageReceived(endpointId, payload.Call("asBytes"), /* isReliableMessage */ true); - } - } - - public void StartDiscovery(string serviceId, TimeSpan? advertisingDuration, - IDiscoveryListener listener) - { - Misc.CheckNotNull(serviceId, "serviceId"); - Misc.CheckNotNull(listener, "listener"); - - var listenerOnGameThread = new OnGameThreadDiscoveryListener(listener); - - if (advertisingDuration.HasValue && advertisingDuration.Value.Ticks < 0) - { - throw new InvalidOperationException("advertisingDuration must be positive"); - } - - using (var endpointDiscoveryCallback = new AndroidJavaObject( - "com.google.games.bridge.EndpointDiscoveryCallbackProxy", - new EndpointDiscoveryCallback(listenerOnGameThread))) - using (var discoveryOptions = CreateDiscoveryOptions()) - using (var task = mClient.Call("startDiscovery", serviceId, endpointDiscoveryCallback, - discoveryOptions)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - v => NearbyHelperObject.StartDiscoveryTimer(advertisingDuration) - ); - } - } - - private class DiscoveringConnectionLifecycleCallback : AndroidJavaProxy - { - private Action mResponseCallback; - private IMessageListener mListener; - private AndroidJavaObject mClient; - - public DiscoveringConnectionLifecycleCallback(Action responseCallback, - IMessageListener listener, AndroidJavaObject client) : base( - "com/google/games/bridge/ConnectionLifecycleCallbackProxy$Callback") - { - mResponseCallback = responseCallback; - mListener = listener; - mClient = client; - } - - public void onConnectionInitiated(string endpointId, AndroidJavaObject connectionInfo) - { - using (var payloadCallback = new AndroidJavaObject("com.google.games.bridge.PayloadCallbackProxy", - new PayloadCallback(mListener))) - using (mClient.Call("acceptConnection", endpointId, payloadCallback)) - ; - } - - public void onConnectionResult(string endpointId, AndroidJavaObject connectionResolution) - { - int statusCode; - using (var status = connectionResolution.Call("getStatus")) - { - statusCode = status.Call("getStatusCode"); - } - - if (statusCode == 0) // STATUS_OK - { - mResponseCallback(ConnectionResponse.Accepted(NearbyClientId, endpointId, new byte[0])); - return; - } - - if (statusCode == 8002) // STATUS_ALREADY_DISCOVERING - { - mResponseCallback(ConnectionResponse.AlreadyConnected(NearbyClientId, endpointId)); - return; - } - - mResponseCallback(ConnectionResponse.Rejected(NearbyClientId, endpointId)); - } - - public void onDisconnected(string endpointId) - { - mListener.OnRemoteEndpointDisconnected(endpointId); - } - } - - private AndroidJavaObject CreateDiscoveryOptions() - { - using (var strategy = - new AndroidJavaClass("com.google.android.gms.nearby.connection.Strategy").GetStatic( - "P2P_CLUSTER")) - using (var builder = - new AndroidJavaObject("com.google.android.gms.nearby.connection.DiscoveryOptions$Builder")) - using (builder.Call("setStrategy", strategy)) - { - return builder.Call("build"); - } - } - - private class EndpointDiscoveryCallback : AndroidJavaProxy - { - private IDiscoveryListener mListener; - - public EndpointDiscoveryCallback(IDiscoveryListener listener) : base( - "com/google/games/bridge/EndpointDiscoveryCallbackProxy$Callback") - { - mListener = listener; - } - - public void onEndpointFound(string endpointId, AndroidJavaObject endpointInfo) - { - mListener.OnEndpointFound(CreateEndPointDetails(endpointId, endpointInfo)); - } - - public void onEndpointLost(string endpointId) - { - mListener.OnEndpointLost(endpointId); - } - - private EndpointDetails CreateEndPointDetails(string endpointId, AndroidJavaObject endpointInfo) - { - return new EndpointDetails( - endpointId, - endpointInfo.Call("getEndpointName"), - endpointInfo.Call("getServiceId") - ); - } - } - - private class OnGameThreadMessageListener : IMessageListener - { - private readonly IMessageListener mListener; - - public OnGameThreadMessageListener(IMessageListener listener) - { - mListener = Misc.CheckNotNull(listener); - } - - public void OnMessageReceived(string remoteEndpointId, byte[] data, - bool isReliableMessage) - { - PlayGamesHelperObject.RunOnGameThread(() => mListener.OnMessageReceived( - remoteEndpointId, data, isReliableMessage)); - } - - public void OnRemoteEndpointDisconnected(string remoteEndpointId) - { - PlayGamesHelperObject.RunOnGameThread( - () => mListener.OnRemoteEndpointDisconnected(remoteEndpointId)); - } - } - - private class OnGameThreadDiscoveryListener : IDiscoveryListener - { - private readonly IDiscoveryListener mListener; - - public OnGameThreadDiscoveryListener(IDiscoveryListener listener) - { - mListener = listener; - } - - public void OnEndpointFound(EndpointDetails discoveredEndpoint) - { - PlayGamesHelperObject.RunOnGameThread(() => mListener.OnEndpointFound(discoveredEndpoint)); - } - - public void OnEndpointLost(string lostEndpointId) - { - PlayGamesHelperObject.RunOnGameThread(() => mListener.OnEndpointLost(lostEndpointId)); - } - } - - public void StopDiscovery(string serviceId) - { - mClient.Call("stopDiscovery"); - } - - public void RejectConnectionRequest(string requestingEndpointId) - { - Misc.CheckNotNull(requestingEndpointId, "requestingEndpointId"); - using (var task = mClient.Call("rejectConnection", requestingEndpointId)) ; - } - - public void DisconnectFromEndpoint(string remoteEndpointId) - { - mClient.Call("disconnectFromEndpoint", remoteEndpointId); - } - - public void StopAllConnections() - { - mClient.Call("stopAllEndpoints"); - mAdvertisingMessageListener = null; - } - - public string GetAppBundleId() - { - using (var activity = AndroidHelperFragment.GetActivity()) - { - return activity.Call("getPackageName"); - } - } - - public string GetServiceId() - { - return ServiceId; - } - - private static string ReadServiceId() - { - using (var activity = AndroidHelperFragment.GetActivity()) - { - string packageName = activity.Call("getPackageName"); - using (var pm = activity.Call("getPackageManager")) - using (var appInfo = - pm.Call("getApplicationInfo", packageName, ApplicationInfoFlags)) - using (var bundle = appInfo.Get("metaData")) - { - string sysId = bundle.Call("getString", - "com.google.android.gms.nearby.connection.SERVICE_ID"); - OurUtils.Logger.d("SystemId from Manifest: " + sysId); - return sysId; - } - } - } - - private static Action ToOnGameThread(Action toConvert) - { - return (val) => PlayGamesHelperObject.RunOnGameThread(() => toConvert(val)); - } - - private static Action ToOnGameThread(Action toConvert) - { - return (val1, val2) => PlayGamesHelperObject.RunOnGameThread(() => toConvert(val1, val2)); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs.meta deleted file mode 100644 index 44c87b9..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidNearbyConnectionClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: d69ac0a61e8943ff82b14f7469f0fe97 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs deleted file mode 100644 index 0a0616f..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs +++ /dev/null @@ -1,526 +0,0 @@ -#if UNITY_ANDROID -#pragma warning disable 0642 // Possible mistaken empty statement - -namespace GooglePlayGames.Android -{ - using System; - using System.Collections.Generic; - using System.Text.RegularExpressions; - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.SavedGame; - using GooglePlayGames.OurUtils; - using UnityEngine; - - internal class AndroidSavedGameClient : ISavedGameClient - { - // Regex for a valid filename. Valid file names are between 1 and 100 characters (inclusive) - // and only include URL-safe characters: a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~". - // This regex is guarded by \A and \Z which guarantee that the entire string matches this - // regex. If these were omitted, then illegal strings containing legal subsequences would be - // allowed (since the regex would match those subsequences). - private static readonly Regex ValidFilenameRegex = new Regex(@"\A[a-zA-Z0-9-._~]{1,100}\Z"); - - private volatile AndroidJavaObject mSnapshotsClient; - private volatile AndroidClient mAndroidClient; - - public AndroidSavedGameClient(AndroidClient androidClient) - { - mAndroidClient = androidClient; - using (var gamesClass = new AndroidJavaClass("com.google.android.gms.games.PlayGames")) - { - mSnapshotsClient = gamesClass.CallStatic("getSnapshotsClient", - AndroidHelperFragment.GetActivity()); - } - } - - public void OpenWithAutomaticConflictResolution(string filename, DataSource source, - ConflictResolutionStrategy resolutionStrategy, - Action completedCallback) - { - Misc.CheckNotNull(filename); - Misc.CheckNotNull(completedCallback); - bool prefetchDataOnConflict = false; - ConflictCallback conflictCallback = null; - completedCallback = ToOnGameThread(completedCallback); - - if (conflictCallback == null) - { - conflictCallback = (resolver, original, originalData, unmerged, unmergedData) => - { - switch (resolutionStrategy) - { - case ConflictResolutionStrategy.UseOriginal: - resolver.ChooseMetadata(original); - return; - case ConflictResolutionStrategy.UseUnmerged: - resolver.ChooseMetadata(unmerged); - return; - case ConflictResolutionStrategy.UseLongestPlaytime: - if (original.TotalTimePlayed >= unmerged.TotalTimePlayed) - { - resolver.ChooseMetadata(original); - } - else - { - resolver.ChooseMetadata(unmerged); - } - - return; - default: - OurUtils.Logger.e("Unhandled strategy " + resolutionStrategy); - completedCallback(SavedGameRequestStatus.InternalError, null); - return; - } - }; - } - - conflictCallback = ToOnGameThread(conflictCallback); - - if (!IsValidFilename(filename)) - { - OurUtils.Logger.e("Received invalid filename: " + filename); - completedCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - InternalOpen(filename, source, resolutionStrategy, prefetchDataOnConflict, conflictCallback, - completedCallback); - } - - public void OpenWithManualConflictResolution(string filename, DataSource source, bool prefetchDataOnConflict, - ConflictCallback conflictCallback, Action completedCallback) - { - Misc.CheckNotNull(filename); - Misc.CheckNotNull(conflictCallback); - Misc.CheckNotNull(completedCallback); - - conflictCallback = ToOnGameThread(conflictCallback); - completedCallback = ToOnGameThread(completedCallback); - - if (!IsValidFilename(filename)) - { - OurUtils.Logger.e("Received invalid filename: " + filename); - completedCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - InternalOpen(filename, source, ConflictResolutionStrategy.UseManual, prefetchDataOnConflict, - conflictCallback, completedCallback); - } - - private void InternalOpen(string filename, DataSource source, ConflictResolutionStrategy resolutionStrategy, - bool prefetchDataOnConflict, ConflictCallback conflictCallback, - Action completedCallback) - { - int conflictPolicy; // SnapshotsClient.java#RetentionPolicy - switch (resolutionStrategy) - { - case ConflictResolutionStrategy.UseLastKnownGood: - conflictPolicy = 2 /* RESOLUTION_POLICY_LAST_KNOWN_GOOD */; - break; - case ConflictResolutionStrategy.UseMostRecentlySaved: - conflictPolicy = 3 /* RESOLUTION_POLICY_MOST_RECENTLY_MODIFIED */; - break; - case ConflictResolutionStrategy.UseLongestPlaytime: - conflictPolicy = 1 /* RESOLUTION_POLICY_LONGEST_PLAYTIME*/; - break; - case ConflictResolutionStrategy.UseManual: - conflictPolicy = -1 /* RESOLUTION_POLICY_MANUAL */; - break; - default: - conflictPolicy = 3 /* RESOLUTION_POLICY_MOST_RECENTLY_MODIFIED */; - break; - } - - using (var task = - mSnapshotsClient.Call("open", filename, /* createIfNotFound= */ true, - conflictPolicy)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - dataOrConflict => - { - if (dataOrConflict.Call("isConflict")) - { - var conflict = dataOrConflict.Call("getConflict"); - AndroidSnapshotMetadata original = - new AndroidSnapshotMetadata(conflict.Call("getSnapshot")); - AndroidSnapshotMetadata unmerged = - new AndroidSnapshotMetadata( - conflict.Call("getConflictingSnapshot")); - - // Instantiate the conflict resolver. Note that the retry callback closes over - // all the parameters we need to retry the open attempt. Once the conflict is - // resolved by invoking the appropriate resolution method on - // AndroidConflictResolver, the resolver will invoke this callback, which will - // result in this method being re-executed. This recursion will continue until - // all conflicts are resolved or an error occurs. - AndroidConflictResolver resolver = new AndroidConflictResolver( - this, - mSnapshotsClient, - conflict, - original, - unmerged, - completedCallback, - () => InternalOpen(filename, source, resolutionStrategy, - prefetchDataOnConflict, - conflictCallback, completedCallback)); - - var originalBytes = original.JavaContents.Call("readFully"); - var unmergedBytes = unmerged.JavaContents.Call("readFully"); - conflictCallback(resolver, original, originalBytes, unmerged, unmergedBytes); - } - else - { - using (var snapshot = dataOrConflict.Call("getData")) - { - AndroidJavaObject metadata = snapshot.Call("freeze"); - completedCallback(SavedGameRequestStatus.Success, - new AndroidSnapshotMetadata(metadata)); - } - } - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => { - OurUtils.Logger.d("InternalOpen has failed: " + exception.Call("toString")); - var status = mAndroidClient.IsAuthenticated() ? - SavedGameRequestStatus.InternalError : - SavedGameRequestStatus.AuthenticationError; - completedCallback(status, null); - } - ); - } - } - - public void ReadBinaryData(ISavedGameMetadata metadata, - Action completedCallback) - { - Misc.CheckNotNull(metadata); - Misc.CheckNotNull(completedCallback); - completedCallback = ToOnGameThread(completedCallback); - - AndroidSnapshotMetadata convertedMetadata = metadata as AndroidSnapshotMetadata; - - if (convertedMetadata == null) - { - OurUtils.Logger.e("Encountered metadata that was not generated by this ISavedGameClient"); - completedCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - if (!convertedMetadata.IsOpen) - { - OurUtils.Logger.e("This method requires an open ISavedGameMetadata."); - completedCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - byte[] data = convertedMetadata.JavaContents.Call("readFully"); - if (data == null) - { - completedCallback(SavedGameRequestStatus.BadInputError, null); - } - else - { - completedCallback(SavedGameRequestStatus.Success, data); - } - } - - public void ShowSelectSavedGameUI(string uiTitle, uint maxDisplayedSavedGames, bool showCreateSaveUI, - bool showDeleteSaveUI, Action callback) - { - Misc.CheckNotNull(uiTitle); - Misc.CheckNotNull(callback); - - callback = ToOnGameThread(callback); - - if (!(maxDisplayedSavedGames > 0)) - { - OurUtils.Logger.e("maxDisplayedSavedGames must be greater than 0"); - callback(SelectUIStatus.BadInputError, null); - return; - } - - AndroidHelperFragment.ShowSelectSnapshotUI( - showCreateSaveUI, showDeleteSaveUI, (int) maxDisplayedSavedGames, uiTitle, callback); - } - - public void CommitUpdate(ISavedGameMetadata metadata, SavedGameMetadataUpdate updateForMetadata, - byte[] updatedBinaryData, Action callback) - { - Misc.CheckNotNull(metadata); - Misc.CheckNotNull(updatedBinaryData); - Misc.CheckNotNull(callback); - - callback = ToOnGameThread(callback); - - AndroidSnapshotMetadata convertedMetadata = metadata as AndroidSnapshotMetadata; - - if (convertedMetadata == null) - { - OurUtils.Logger.e("Encountered metadata that was not generated by this ISavedGameClient"); - callback(SavedGameRequestStatus.BadInputError, null); - return; - } - - if (!convertedMetadata.IsOpen) - { - OurUtils.Logger.e("This method requires an open ISavedGameMetadata."); - callback(SavedGameRequestStatus.BadInputError, null); - return; - } - - if (!convertedMetadata.JavaContents.Call("writeBytes", updatedBinaryData)) - { - OurUtils.Logger.e("This method requires an open ISavedGameMetadata."); - callback(SavedGameRequestStatus.BadInputError, null); - } - - using (var convertedMetadataChange = AsMetadataChange(updateForMetadata)) - using (var task = mSnapshotsClient.Call("commitAndClose", convertedMetadata.JavaSnapshot, - convertedMetadataChange)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - /* disposeResult= */ false, - snapshotMetadata => - { - OurUtils.Logger.d("commitAndClose.succeed"); - callback(SavedGameRequestStatus.Success, - new AndroidSnapshotMetadata(snapshotMetadata, /* contents= */null)); - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => - { - OurUtils.Logger.e("commitAndClose.failed: " + exception.Call("toString")); - var status = mAndroidClient.IsAuthenticated() ? - SavedGameRequestStatus.InternalError : - SavedGameRequestStatus.AuthenticationError; - callback(status, null); - }); - } - } - - public void FetchAllSavedGames(DataSource source, - Action> callback) - { - Misc.CheckNotNull(callback); - - callback = ToOnGameThread(callback); - - using (var task = - mSnapshotsClient.Call("load", /* forecReload= */ - source == DataSource.ReadNetworkOnly)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - annotatedData => - { - using (var buffer = annotatedData.Call("get")) - { - int count = buffer.Call("getCount"); - List result = new List(); - for (int i = 0; i < count; ++i) - { - using (var metadata = buffer.Call("get", i)) - { - result.Add(new AndroidSnapshotMetadata( - metadata.Call("freeze"), /* contents= */null)); - } - } - - buffer.Call("release"); - callback(SavedGameRequestStatus.Success, result); - } - }); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => { - OurUtils.Logger.d("FetchAllSavedGames failed: " + exception.Call("toString")); - var status = mAndroidClient.IsAuthenticated() ? - SavedGameRequestStatus.InternalError : - SavedGameRequestStatus.AuthenticationError; - callback(status, new List()); - } - ); - } - } - - public void Delete(ISavedGameMetadata metadata) - { - AndroidSnapshotMetadata androidMetadata = metadata as AndroidSnapshotMetadata; - Misc.CheckNotNull(androidMetadata); - using (mSnapshotsClient.Call("delete", androidMetadata.JavaMetadata)) ; - } - - private ConflictCallback ToOnGameThread(ConflictCallback conflictCallback) - { - return (resolver, original, originalData, unmerged, unmergedData) => - { - OurUtils.Logger.d("Invoking conflict callback"); - PlayGamesHelperObject.RunOnGameThread(() => - conflictCallback(resolver, original, originalData, unmerged, unmergedData)); - }; - } - - /// - /// A helper class that encapsulates the state around resolving a file conflict. It holds all - /// the state that is necessary to invoke as well as a - /// callback that will re-attempt to open the file after the resolution concludes. - /// - private class AndroidConflictResolver : IConflictResolver - { - private readonly AndroidJavaObject mSnapshotsClient; - private readonly AndroidJavaObject mConflict; - private readonly AndroidSnapshotMetadata mOriginal; - private readonly AndroidSnapshotMetadata mUnmerged; - private readonly Action mCompleteCallback; - private readonly Action mRetryFileOpen; - - private readonly AndroidSavedGameClient mAndroidSavedGameClient; - - internal AndroidConflictResolver(AndroidSavedGameClient androidSavedGameClient, AndroidJavaObject snapshotClient, AndroidJavaObject conflict, - AndroidSnapshotMetadata original, AndroidSnapshotMetadata unmerged, - Action completeCallback, Action retryOpen) - { - this.mAndroidSavedGameClient = androidSavedGameClient; - this.mSnapshotsClient = Misc.CheckNotNull(snapshotClient); - this.mConflict = Misc.CheckNotNull(conflict); - this.mOriginal = Misc.CheckNotNull(original); - this.mUnmerged = Misc.CheckNotNull(unmerged); - this.mCompleteCallback = Misc.CheckNotNull(completeCallback); - this.mRetryFileOpen = Misc.CheckNotNull(retryOpen); - } - - public void ResolveConflict(ISavedGameMetadata chosenMetadata, SavedGameMetadataUpdate metadataUpdate, - byte[] updatedData) - { - AndroidSnapshotMetadata convertedMetadata = chosenMetadata as AndroidSnapshotMetadata; - - if (convertedMetadata != mOriginal && convertedMetadata != mUnmerged) - { - OurUtils.Logger.e("Caller attempted to choose a version of the metadata that was not part " + - "of the conflict"); - mCompleteCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - using (var contentUpdate = mConflict.Call("getResolutionSnapshotContents")) - { - if (!contentUpdate.Call("writeBytes", updatedData)) - { - OurUtils.Logger.e("Can't update snapshot contents during conflict resolution."); - mCompleteCallback(SavedGameRequestStatus.BadInputError, null); - } - - using (var convertedMetadataChange = AsMetadataChange(metadataUpdate)) - using (var task = mSnapshotsClient.Call( - "resolveConflict", - mConflict.Call("getConflictId"), - convertedMetadata.JavaMetadata.Call("getSnapshotId"), - convertedMetadataChange, - contentUpdate)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - dataOrConflict => mRetryFileOpen()); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => { - OurUtils.Logger.d("ResolveConflict failed: " + exception.Call("toString")); - var status = mAndroidSavedGameClient.mAndroidClient.IsAuthenticated() ? - SavedGameRequestStatus.InternalError : - SavedGameRequestStatus.AuthenticationError; - mCompleteCallback(status, null); - } - ); - } - } - } - - public void ChooseMetadata(ISavedGameMetadata chosenMetadata) - { - AndroidSnapshotMetadata convertedMetadata = chosenMetadata as AndroidSnapshotMetadata; - - if (convertedMetadata != mOriginal && convertedMetadata != mUnmerged) - { - OurUtils.Logger.e("Caller attempted to choose a version of the metadata that was not part " + - "of the conflict"); - mCompleteCallback(SavedGameRequestStatus.BadInputError, null); - return; - } - - using (var task = mSnapshotsClient.Call( - "resolveConflict", mConflict.Call("getConflictId"), convertedMetadata.JavaSnapshot)) - { - AndroidTaskUtils.AddOnSuccessListener( - task, - dataOrConflict => mRetryFileOpen()); - - AndroidTaskUtils.AddOnFailureListener( - task, - exception => { - OurUtils.Logger.d("ChooseMetadata failed: " + exception.Call("toString")); - var status = mAndroidSavedGameClient.mAndroidClient.IsAuthenticated() ? - SavedGameRequestStatus.InternalError : - SavedGameRequestStatus.AuthenticationError; - mCompleteCallback(status, null); - } - ); - } - } - } - - internal static bool IsValidFilename(string filename) - { - if (filename == null) - { - return false; - } - - return ValidFilenameRegex.IsMatch(filename); - } - - private static AndroidJavaObject AsMetadataChange(SavedGameMetadataUpdate update) - { - using (var builder = - new AndroidJavaObject("com.google.android.gms.games.snapshot.SnapshotMetadataChange$Builder")) - { - if (update.IsCoverImageUpdated) - { - using (var bitmapFactory = new AndroidJavaClass("android.graphics.BitmapFactory")) - using (var bitmap = bitmapFactory.CallStatic( - "decodeByteArray", update.UpdatedPngCoverImage, /* offset= */0, - update.UpdatedPngCoverImage.Length)) - using (builder.Call("setCoverImage", bitmap)) - ; - } - - if (update.IsDescriptionUpdated) - { - using (builder.Call("setDescription", update.UpdatedDescription)) ; - } - - if (update.IsPlayedTimeUpdated) - { - using (builder.Call("setPlayedTimeMillis", - Convert.ToInt64(update.UpdatedPlayedTime.Value.TotalMilliseconds))) ; - } - - return builder.Call("build"); - } - } - - private static Action ToOnGameThread(Action toConvert) - { - return (val1, val2) => PlayGamesHelperObject.RunOnGameThread(() => toConvert(val1, val2)); - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs.meta deleted file mode 100644 index 3e7d014..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSavedGameClient.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: a52ca79a06d83464e89d0d052c9af7d9 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs deleted file mode 100644 index 23623fb..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs +++ /dev/null @@ -1,90 +0,0 @@ -#if UNITY_ANDROID - -namespace GooglePlayGames.Android -{ - using System; - using System.Collections.Generic; - using GooglePlayGames.BasicApi; - using GooglePlayGames.BasicApi.SavedGame; - using UnityEngine; - - internal class AndroidSnapshotMetadata : ISavedGameMetadata - { - private AndroidJavaObject mJavaSnapshot; - private AndroidJavaObject mJavaMetadata; - private AndroidJavaObject mJavaContents; - - public AndroidSnapshotMetadata(AndroidJavaObject javaSnapshot) - { - mJavaSnapshot = javaSnapshot; - mJavaMetadata = javaSnapshot.Call("getMetadata"); - mJavaContents = javaSnapshot.Call("getSnapshotContents"); - } - - public AndroidSnapshotMetadata(AndroidJavaObject javaMetadata, AndroidJavaObject javaContents) - { - mJavaSnapshot = null; - mJavaMetadata = javaMetadata; - mJavaContents = javaContents; - } - - public AndroidJavaObject JavaSnapshot - { - get { return mJavaSnapshot; } - } - - public AndroidJavaObject JavaMetadata - { - get { return mJavaMetadata; } - } - - public AndroidJavaObject JavaContents - { - get { return mJavaContents; } - } - - public bool IsOpen - { - get - { - if (mJavaContents == null) - { - return false; - } - - return !mJavaContents.Call("isClosed"); - } - } - - public string Filename - { - get { return mJavaMetadata.Call("getUniqueName"); } - } - - public string Description - { - get { return mJavaMetadata.Call("getDescription"); } - } - - public string CoverImageURL - { - get { return mJavaMetadata.Call("getCoverImageUrl"); } - } - - public TimeSpan TotalTimePlayed - { - get { return TimeSpan.FromMilliseconds(mJavaMetadata.Call("getPlayedTime")); } - } - - public DateTime LastModifiedTimestamp - { - get - { - long timestamp = mJavaMetadata.Call("getLastModifiedTimestamp"); - System.DateTime lastModifiedTime = AndroidJavaConverter.ToDateTime(timestamp); - return lastModifiedTime; - } - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs.meta deleted file mode 100644 index f8b9599..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidSnapshotMetadata.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 330ac7fa11d9a4bc099f0db5a3c26ad7 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs deleted file mode 100644 index 4740cae..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs +++ /dev/null @@ -1,111 +0,0 @@ -#if UNITY_ANDROID -#pragma warning disable 0642 // Possible mistaken empty statement - -namespace GooglePlayGames.Android -{ - using UnityEngine; - using System; - - class AndroidTaskUtils - { - private AndroidTaskUtils() - { - } - - public static void AddOnSuccessListener(AndroidJavaObject task, Action callback) - { - using (task.Call("addOnSuccessListener", - new TaskOnSuccessProxy(callback, /* disposeResult= */ true))) ; - } - - public static void AddOnSuccessListener(AndroidJavaObject task, bool disposeResult, Action callback) - { - using (task.Call("addOnSuccessListener", - new TaskOnSuccessProxy(callback, disposeResult))) ; - } - - public static void AddOnFailureListener(AndroidJavaObject task, Action callback) - { - using (task.Call("addOnFailureListener", new TaskOnFailedProxy(callback))) ; - } - - public static void AddOnCompleteListener(AndroidJavaObject task, Action callback) - { - using (task.Call("addOnCompleteListener", new TaskOnCompleteProxy(callback))) ; - } - - private class TaskOnCompleteProxy : AndroidJavaProxy - { - private Action mCallback; - - public TaskOnCompleteProxy(Action callback) - : base("com/google/android/gms/tasks/OnCompleteListener") - { - mCallback = callback; - } - - public void onComplete(T result) - { - if (result is IDisposable) - { - using ((IDisposable) result) - { - mCallback(result); - } - } - else - { - mCallback(result); - } - } - } - - private class TaskOnSuccessProxy : AndroidJavaProxy - { - private Action mCallback; - private bool mDisposeResult; - - public TaskOnSuccessProxy(Action callback, bool disposeResult) - : base("com/google/android/gms/tasks/OnSuccessListener") - { - mCallback = callback; - mDisposeResult = disposeResult; - } - - public void onSuccess(T result) - { - if (result is IDisposable && mDisposeResult) - { - using ((IDisposable) result) - { - mCallback(result); - } - } - else - { - mCallback(result); - } - } - } - - private class TaskOnFailedProxy : AndroidJavaProxy - { - private Action mCallback; - - public TaskOnFailedProxy(Action callback) - : base("com/google/android/gms/tasks/OnFailureListener") - { - mCallback = callback; - } - - public void onFailure(AndroidJavaObject exception) - { - using (exception) - { - mCallback(exception); - } - } - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs.meta deleted file mode 100644 index 20d0150..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidTaskUtils.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 5d045a29538404b2da664bb55de949de -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs deleted file mode 100644 index 2122714..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Android only feature - -#if (UNITY_ANDROID) -namespace GooglePlayGames -{ - using UnityEngine; - using System; - using GooglePlayGames.OurUtils; - using GooglePlayGames.BasicApi.Nearby; - - public static class NearbyConnectionClientFactory - { - public static void Create(Action callback) - { - if (Application.isEditor) - { - GooglePlayGames.OurUtils.Logger.d("Creating INearbyConnection in editor, using DummyClient."); - callback.Invoke(new GooglePlayGames.BasicApi.Nearby.DummyNearbyConnectionClient()); - } - - callback.Invoke(new GooglePlayGames.Android.AndroidNearbyConnectionClient()); - } - } -} -#endif //UNITY_ANDROID \ No newline at end of file diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs.meta deleted file mode 100644 index 4376426..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/NearbyConnectionClientFactory.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: ff1201bd0205943ba9c881e50e38156b -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs deleted file mode 100644 index 0c1ca52..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#if UNITY_ANDROID - -namespace GooglePlayGames -{ - using UnityEngine; - using GooglePlayGames.BasicApi; - using GooglePlayGames.OurUtils; - - internal class PlayGamesClientFactory - { - internal static IPlayGamesClient GetPlatformPlayGamesClient() - { - if (Application.isEditor) - { - GooglePlayGames.OurUtils.Logger.d("Creating IPlayGamesClient in editor, using DummyClient."); - return new GooglePlayGames.BasicApi.DummyClient(); - } -#if UNITY_ANDROID - GooglePlayGames.OurUtils.Logger.d("Creating Android IPlayGamesClient Client"); - return new GooglePlayGames.Android.AndroidClient(); -#else - GooglePlayGames.OurUtils.Logger.d("Cannot create IPlayGamesClient for unknown platform, returning DummyClient"); - return new GooglePlayGames.BasicApi.DummyClient(); -#endif - } - } -} -#endif diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs.meta deleted file mode 100644 index 5955d82..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/PlayGamesClientFactory.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 435fc2d0dc0ba475e9c8b0796303d6dd -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs deleted file mode 100644 index eaf6820..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (C) 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace GooglePlayGames -{ - public class PluginVersion - { - // Current Version. - public const int VersionInt = 0x01101; - public const string VersionString = "0.11.01"; - public const string VersionKey = "01101" ; - } -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs.meta deleted file mode 100644 index 156d4e6..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/Runtime/Scripts/PluginVersion.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: 4539142948daf4a26bf9cd6870ffa0b2 -labels: -- gvh -- gvh_version-0.11.01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json deleted file mode 100644 index 5b29d7a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "com.google.play.games", - "displayName": "Google Play Games", - "description": "The Google Play Games plugin for Unity allows you to access the Google Play Games API through Unity's social interface.", - "version": "0.11.01", - "unity": "2018.4", - "author": { - "name": "Google LLC" - }, - "dependencies": {} -} diff --git a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json.meta b/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json.meta deleted file mode 100644 index ce3f10a..0000000 --- a/Assets/Samples/Dependencies/GooglePlayGames/com.google.play.games/package.json.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 51dd7d46faed94b31a71d5f4cec6ce14 -labels: -- gvh -- gvh_version-0.11.01 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Plugins.meta b/Assets/Samples/Dependencies/Plugins.meta deleted file mode 100644 index 5039af7..0000000 --- a/Assets/Samples/Dependencies/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 897dcf4ca694a4f8aa6a17a53f25d401 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Plugins/Android.meta b/Assets/Samples/Dependencies/Plugins/Android.meta deleted file mode 100644 index 61613d6..0000000 --- a/Assets/Samples/Dependencies/Plugins/Android.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b82935096b66e4a3488051ee5add1eaa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib.meta b/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib.meta deleted file mode 100644 index 2e053c3..0000000 --- a/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: f05afda710e2d445f959d5033c5593bb -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml b/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml deleted file mode 100644 index 62b24a0..0000000 --- a/Assets/Samples/Dependencies/Plugins/Android/GooglePlayGamesManifest.androidlib/AndroidManifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Assets/Samples/GPGSIds.cs b/Assets/Samples/GPGSIds.cs deleted file mode 100644 index 2bb8a21..0000000 --- a/Assets/Samples/GPGSIds.cs +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (C) 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// -/// This file is automatically generated DO NOT EDIT! -/// -/// These are the constants defined in the Play Games Console for Game Services -/// Resources. -/// - - -public static class GPGSIds -{ - public const string achievement_test_achievement = "CgkIscfzgrYeEAIQAw"; // - -} - diff --git a/Assets/Samples/GPGSIds.cs.meta b/Assets/Samples/GPGSIds.cs.meta deleted file mode 100644 index dfc7c73..0000000 --- a/Assets/Samples/GPGSIds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c876a29669d1478a908fceeb35c152c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Scripts/Auth.meta b/Assets/Samples/Scripts/Auth.meta deleted file mode 100644 index 87370e8..0000000 --- a/Assets/Samples/Scripts/Auth.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 396265e2c0d3f456fadd405d92ed4802 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Scripts/Auth/GameCenter.cs b/Assets/Samples/Scripts/Auth/GameCenter.cs deleted file mode 100644 index 242b261..0000000 --- a/Assets/Samples/Scripts/Auth/GameCenter.cs +++ /dev/null @@ -1,57 +0,0 @@ -#if UNITY_IOS - -using System; -using System.Threading.Tasks; -using UnityEngine; -using Apple.GameKit; -using Apple.GameKit.Players; - -// More details: https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-apple-game-center -public static class GameCenter -{ - public static string Signature; - public static string TeamPlayerID; - public static string Salt; - public static string PublicKeyUrl; - public static string Timestamp; - - public static async void Activate() - { - await Login(); - } - - private static async Task Login() - { - if (!GKLocalPlayer.Local.IsAuthenticated) - { - // Perform the authentication. - var player = await GKLocalPlayer.Authenticate(); - Debug.Log($"[APPLE GAME CENTER] Login successful - {player.DisplayName}"); - - // Grab the team player id. - var localPlayer = GKLocalPlayer.Local; - TeamPlayerID = localPlayer.TeamPlayerId; - - //Fetch signature, salt, timestamp and public key for server-side verification. - RefreshCredentials(); - DeeplinkExample.Instance.DisplayUsername(player.DisplayName); - } - else - { - Debug.Log("[APPLE GAME CENTER] Already logged in."); - } - } - - public static async Task RefreshCredentials() - { - var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems(); - Debug.Log($"[APPLE GAME CENTER] Credentials refreshed"); - - Signature = Convert.ToBase64String(fetchItemsResponse.Signature); - Salt = Convert.ToBase64String(fetchItemsResponse.Salt); - PublicKeyUrl = fetchItemsResponse.PublicKeyUrl; - Timestamp = fetchItemsResponse.Timestamp.ToString(); - } -} - -#endif \ No newline at end of file diff --git a/Assets/Samples/Scripts/Auth/GameCenter.cs.meta b/Assets/Samples/Scripts/Auth/GameCenter.cs.meta deleted file mode 100644 index afd44d6..0000000 --- a/Assets/Samples/Scripts/Auth/GameCenter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6db52edb5888347039edf59597cc1323 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Samples/Scripts/Auth/PlayGames.cs b/Assets/Samples/Scripts/Auth/PlayGames.cs deleted file mode 100644 index cad973f..0000000 --- a/Assets/Samples/Scripts/Auth/PlayGames.cs +++ /dev/null @@ -1,48 +0,0 @@ -#if UNITY_ANDROID - -using UnityEngine; -using GooglePlayGames; -using GooglePlayGames.BasicApi; - -// More details: https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-google-play-games -public static class PlayGames -{ - public static string AuthCode; - - public static void Activate() - { - PlayGamesPlatform.Activate(); - Login(); - } - - private static void Login() - { - PlayGamesPlatform.Instance.Authenticate((success) => - { - if (success == SignInStatus.Success) - { - string displayName = PlayGamesPlatform.Instance.GetUserDisplayName(); - Debug.Log($"[GOOGLE PLAY GAMES] Login successful - {displayName}"); - - //Fetch AuthCode for server-side verification. - RefreshCredentials(); - DeeplinkExample.Instance.DisplayUsername(displayName); - } - else - { - Debug.Log("[GOOGLE PLAY GAMES] Login unsuccessful."); - } - }); - } - - public static void RefreshCredentials() - { - PlayGamesPlatform.Instance.RequestServerSideAccess(true, code => - { - Debug.Log($"[GOOGLE PLAY GAMES] Credentials refreshed - {code}"); - AuthCode = code; - }); - } -} - -#endif diff --git a/Assets/Samples/Scripts/Auth/PlayGames.cs.meta b/Assets/Samples/Scripts/Auth/PlayGames.cs.meta deleted file mode 100644 index 2866043..0000000 --- a/Assets/Samples/Scripts/Auth/PlayGames.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 454ac0162cb6f472e8af81b873aa393f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 0ae0149..3023dd0 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,7 +1,5 @@ { "dependencies": { - "com.apple.unityplugin.core": "file:/Users/ondrejrehacek/Downloads/AppleUnityPlugins-main/com.apple.unityplugin.core-1.0.5.tgz", - "com.apple.unityplugin.gamekit": "file:/Users/ondrejrehacek/Downloads/AppleUnityPlugins-main/com.apple.unityplugin.gamekit-1.0.4.tgz", "com.unity.2d.sprite": "1.0.0", "com.unity.2d.tilemap": "1.0.0", "com.unity.ads": "4.4.2", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 015b620..89dc920 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,19 +1,5 @@ { "dependencies": { - "com.apple.unityplugin.core": { - "version": "file:/Users/ondrejrehacek/Downloads/AppleUnityPlugins-main/com.apple.unityplugin.core-1.0.5.tgz", - "depth": 0, - "source": "local-tarball", - "dependencies": {} - }, - "com.apple.unityplugin.gamekit": { - "version": "file:/Users/ondrejrehacek/Downloads/AppleUnityPlugins-main/com.apple.unityplugin.gamekit-1.0.4.tgz", - "depth": 0, - "source": "local-tarball", - "dependencies": { - "com.apple.unityplugin.core": "1.0.2" - } - }, "com.unity.2d.sprite": { "version": "1.0.0", "depth": 0, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 0147887..1a4e4b6 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -4,5 +4,8 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 - m_Scenes: [] + m_Scenes: + - enabled: 1 + path: Assets/Sample/Scenes/StashSample.unity + guid: 9fc0d4010bbf28b4594072e72b8655ab m_configObjects: {}