diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f31d8e66d..02f14e7c4 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,9 @@
Version 0.9.34
Bug Fixes:
* #1162 - Cannot build from source
+ * #1179 - Interfaces should not be under `#if`
+ * #1175 - Play-services version needs to be updated to 9.0.0
+ * #1180 - PlayGamesUserProfile.Equals(object obj)` implemented incorrectly
New Features:
* #1085 - Add SpendProbability player stat.
Version 0.9.33
diff --git a/current-build/GooglePlayGamesPlugin-0.9.33.unitypackage b/current-build/GooglePlayGamesPlugin-0.9.33.unitypackage
deleted file mode 100644
index 892971d91..000000000
Binary files a/current-build/GooglePlayGamesPlugin-0.9.33.unitypackage and /dev/null differ
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/CommonTypes.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/CommonTypes.cs
index 3e47e83bf..cb85e203a 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/CommonTypes.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/CommonTypes.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi
{
@@ -115,4 +114,3 @@ public enum LeaderboardCollection
Social = 2,
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Events/IEvent.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Events/IEvent.cs
index aca72eb34..97927a5e9 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Events/IEvent.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Events/IEvent.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Events
{
@@ -79,4 +78,3 @@ EventVisibility Visibility
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/IRealTimeMultiplayerClient.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/IRealTimeMultiplayerClient.cs
index bb290cdd0..b0b4bea0a 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/IRealTimeMultiplayerClient.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/IRealTimeMultiplayerClient.cs
@@ -13,10 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Multiplayer
{
+// move inside the namespace so the namespace is declared if not using GPGS
+#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
using System;
using System.Collections.Generic;
using GooglePlayGames.BasicApi.Multiplayer;
@@ -217,5 +218,5 @@ void CreateWithInvitationScreen(uint minOpponents, uint maxOppponents, uint vari
/// Invitation id to decline.
void DeclineInvitation(string invitationId);
}
-}
-#endif
+ #endif
+}
\ No newline at end of file
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/Player.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/Player.cs
index 843f24a48..f5491494d 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/Player.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Multiplayer/Player.cs
@@ -17,12 +17,11 @@
namespace GooglePlayGames.BasicApi.Multiplayer
{
- using UnityEngine;
///
/// 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 Google account). The player exists across matches, the Participant
+ /// (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
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/AdvertisingResult.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/AdvertisingResult.cs
index 57bfe0dcb..42315470b 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/AdvertisingResult.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/AdvertisingResult.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Nearby
{
@@ -57,4 +56,3 @@ public string LocalEndpointName
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionRequest.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionRequest.cs
index 201aeb703..32dab4e63 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionRequest.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionRequest.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Nearby
{
@@ -50,4 +49,3 @@ public byte[] Payload
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionResponse.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionResponse.cs
index 8ba6a9e7d..c126d6a15 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionResponse.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/ConnectionResponse.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Nearby
{
@@ -119,4 +118,3 @@ public static ConnectionResponse AlreadyConnected(long localClientId,
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/EndpointDetails.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/EndpointDetails.cs
index 12af62477..094200d1e 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/EndpointDetails.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/EndpointDetails.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Nearby
{
@@ -67,4 +66,3 @@ public string ServiceId
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/INearbyConnectionClient.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/INearbyConnectionClient.cs
index c5334ccef..cb33dd2b3 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/INearbyConnectionClient.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/INearbyConnectionClient.cs
@@ -13,12 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
+
namespace GooglePlayGames.BasicApi.Nearby
{
using System;
using System.Collections.Generic;
+ // move this inside IMessageListener and IDiscoveryListener are always declared.
+ #if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
+
public interface INearbyConnectionClient
{
@@ -61,6 +64,7 @@ void StartDiscovery(string serviceId, TimeSpan? advertisingTimeout,
string GetServiceId();
}
+#endif
public interface IMessageListener
{
@@ -77,4 +81,4 @@ public interface IDiscoveryListener
void OnEndpointLost(string lostEndpointId);
}
}
-#endif
+
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/NearbyConnectionConfiguration.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/NearbyConnectionConfiguration.cs
index 57c2a1438..3578fa44b 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/NearbyConnectionConfiguration.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Nearby/NearbyConnectionConfiguration.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Nearby
{
@@ -59,4 +58,3 @@ public Action InitializationCallback
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuest.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuest.cs
index 4704968c5..2f01014c4 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuest.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuest.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Quests
{
@@ -123,4 +122,3 @@ QuestState State
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestMilestone.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestMilestone.cs
index 35f5a9a0c..ea9a7b1b9 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestMilestone.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestMilestone.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Quests
{
@@ -94,4 +93,3 @@ MilestoneState State
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestsClient.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestsClient.cs
index 34de7d904..4433b8fc2 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestsClient.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/Quests/IQuestsClient.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.Quests
{
@@ -160,4 +159,3 @@ void ClaimMilestone(IQuestMilestone milestone,
Action callback);
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameClient.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameClient.cs
index 86a1e28ef..0f56302e2 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameClient.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameClient.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.SavedGame
{
@@ -345,5 +344,4 @@ public interface IConflictResolver
void ChooseMetadata(ISavedGameMetadata chosenMetadata);
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameMetadata.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameMetadata.cs
index 81436e9ee..27ce9d142 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameMetadata.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/ISavedGameMetadata.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.SavedGame
{
@@ -94,4 +93,3 @@ DateTime LastModifiedTimestamp
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/SavedGameMetadataUpdate.cs b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/SavedGameMetadataUpdate.cs
index 39c7466a0..1c5a88c2d 100644
--- a/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/SavedGameMetadataUpdate.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/BasicApi/SavedGame/SavedGameMetadataUpdate.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.BasicApi.SavedGame
{
@@ -132,4 +131,3 @@ public SavedGameMetadataUpdate Build()
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs
index 67a14fc32..fed80181f 100644
--- a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSAndroidSetupUI.cs
@@ -108,6 +108,8 @@ public static bool PerformSetup(
// check the bundle id and set it if needed.
CheckBundleId();
+ GPGSDependencies.svcSupport.ClearDependencies();
+ GPGSDependencies.RegisterDependencies();
PlayServicesResolver.Resolver.DoResolution(
GPGSDependencies.svcSupport,
"Assets/Plugins/Android",
diff --git a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSDependencies.cs b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSDependencies.cs
index bc38aafd6..9660b5f99 100644
--- a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSDependencies.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSDependencies.cs
@@ -46,6 +46,14 @@ static GPGSDependencies()
EditorPrefs.GetString("AndroidSdkRoot"),
"ProjectSettings");
+ RegisterDependencies();
+ }
+
+ ///
+ /// Registers the dependencies.
+ ///
+ public static void RegisterDependencies()
+ {
svcSupport.DependOn("com.google.android.gms",
"play-services-games",
PluginVersion.PlayServicesVersionConstraint);
diff --git a/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs b/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs
index 6eaca7813..366623df6 100644
--- a/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs
@@ -829,7 +829,11 @@ public void LoadAchievementDescriptions(Action callba
{
GooglePlayGames.OurUtils.Logger.e(
"LoadAchievementDescriptions can only be called after authentication.");
- callback.Invoke(null);
+ if (callback != null)
+ {
+ callback.Invoke(null);
+ }
+ return;
}
mClient.LoadAchievements(ach =>
diff --git a/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs b/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs
index 1a5586bba..7b3977255 100644
--- a/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs
@@ -13,10 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
+
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames
{
+ using System;
using System.Collections;
using GooglePlayGames.OurUtils;
using UnityEngine;
@@ -163,12 +165,13 @@ public override bool Equals(object obj)
return true;
}
- if (!typeof(object).IsSubclassOf(typeof(PlayGamesUserProfile)))
+ PlayGamesUserProfile other = obj as PlayGamesUserProfile;
+ if (other == null)
{
return false;
}
- return mPlayerId.Equals(((PlayGamesUserProfile)obj).mPlayerId);
+ return StringComparer.Ordinal.Equals(mPlayerId, other.mPlayerId);
}
public override int GetHashCode()
diff --git a/source/PluginDev/Assets/GooglePlayGames/OurUtils/Logger.cs b/source/PluginDev/Assets/GooglePlayGames/OurUtils/Logger.cs
index 8f5592c2f..27e697c87 100644
--- a/source/PluginDev/Assets/GooglePlayGames/OurUtils/Logger.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/OurUtils/Logger.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.OurUtils
{
@@ -88,4 +87,4 @@ private static string ToLogMessage(string prefix, string logType, string msg)
}
}
}
-#endif
+
diff --git a/source/PluginDev/Assets/GooglePlayGames/OurUtils/Misc.cs b/source/PluginDev/Assets/GooglePlayGames/OurUtils/Misc.cs
index 3eb7c5329..3d97cb837 100644
--- a/source/PluginDev/Assets/GooglePlayGames/OurUtils/Misc.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/OurUtils/Misc.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))
namespace GooglePlayGames.OurUtils
{
@@ -99,4 +98,3 @@ public static T CheckNotNull(T value, string paramName)
}
}
}
-#endif
diff --git a/source/PluginDev/Assets/GooglePlayGames/PluginVersion.cs b/source/PluginDev/Assets/GooglePlayGames/PluginVersion.cs
index c39652b25..54b74c4c5 100644
--- a/source/PluginDev/Assets/GooglePlayGames/PluginVersion.cs
+++ b/source/PluginDev/Assets/GooglePlayGames/PluginVersion.cs
@@ -38,7 +38,7 @@ public class PluginVersion
public const int MinGmsCoreVersionCode = 8487000;
// used to get the right version of dependencies.
- public const string PlayServicesVersionConstraint = "8.4+";
+ public const string PlayServicesVersionConstraint = "9+";
}
}
#endif
diff --git a/source/build.gradle b/source/build.gradle
index 18c7e2643..04e2fa6eb 100644
--- a/source/build.gradle
+++ b/source/build.gradle
@@ -44,7 +44,7 @@ project.ext {
samplesBuildSrc = file('build/sampleSrc').absolutePath
exportPath = file('build/plugin.unitypackage').absolutePath
currentPluginPath = file('../current-build').absolutePath
- currentPluginName = 'GooglePlayGamesPlugin-0.9.33.unitypackage'
+ currentPluginName = 'GooglePlayGamesPlugin-0.9.34.unitypackage'
resolverDir = new File('build/jarresolver').absolutePath
sampleList = ['CubicPilot', 'Minimal',