Skip to content

Commit

Permalink
More updates for 0.9.34
Browse files Browse the repository at this point in the history
 - Updated package name to 0.9.34
 - Fixed
  * playgameservices#1179 - Interfaces should not be under `#if`
  * playgameservices#1175 - Play-services version needs to be updated to 9.0.0
  * playgameservices#1180 - PlayGamesUserProfile.Equals(object obj)` implemented incorrectly

Change-Id: Icb8f051c3bcced402989965bf86db5d7f336b3bb
  • Loading branch information
claywilkinson committed May 26, 2016
2 parents c025cad + 29040f2 commit eb4d8f1
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 42 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi
{
Expand Down Expand Up @@ -115,4 +114,3 @@ public enum LeaderboardCollection
Social = 2,
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Events
{
Expand Down Expand Up @@ -79,4 +78,3 @@ EventVisibility Visibility
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#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;
Expand Down Expand Up @@ -217,5 +218,5 @@ void CreateWithInvitationScreen(uint minOpponents, uint maxOppponents, uint vari
/// <param name="invitationId">Invitation id to decline.</param>
void DeclineInvitation(string invitationId);
}
}
#endif
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

namespace GooglePlayGames.BasicApi.Multiplayer
{
using UnityEngine;

/// <summary>
/// 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.
/// </summary>
public class Player : PlayGamesUserProfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Nearby
{
Expand Down Expand Up @@ -57,4 +56,3 @@ public string LocalEndpointName
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Nearby
{
Expand Down Expand Up @@ -50,4 +49,3 @@ public byte[] Payload
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Nearby
{
Expand Down Expand Up @@ -119,4 +118,3 @@ public static ConnectionResponse AlreadyConnected(long localClientId,
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Nearby
{
Expand Down Expand Up @@ -67,4 +66,3 @@ public string ServiceId
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#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
{

Expand Down Expand Up @@ -61,6 +64,7 @@ void StartDiscovery(string serviceId, TimeSpan? advertisingTimeout,

string GetServiceId();
}
#endif

public interface IMessageListener
{
Expand All @@ -77,4 +81,4 @@ public interface IDiscoveryListener
void OnEndpointLost(string lostEndpointId);
}
}
#endif

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Nearby
{
Expand Down Expand Up @@ -59,4 +58,3 @@ public Action<InitializationStatus> InitializationCallback
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Quests
{
Expand Down Expand Up @@ -123,4 +122,3 @@ QuestState State
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Quests
{
Expand Down Expand Up @@ -94,4 +93,3 @@ MilestoneState State
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.Quests
{
Expand Down Expand Up @@ -160,4 +159,3 @@ void ClaimMilestone(IQuestMilestone milestone,
Action<QuestClaimMilestoneStatus, IQuest, IQuestMilestone> callback);
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.SavedGame
{
Expand Down Expand Up @@ -345,5 +344,4 @@ public interface IConflictResolver
void ChooseMetadata(ISavedGameMetadata chosenMetadata);
}
}
#endif

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.SavedGame
{
Expand Down Expand Up @@ -94,4 +93,3 @@ DateTime LastModifiedTimestamp
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.BasicApi.SavedGame
{
Expand Down Expand Up @@ -132,4 +131,3 @@ public SavedGameMetadataUpdate Build()
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ static GPGSDependencies()
EditorPrefs.GetString("AndroidSdkRoot"),
"ProjectSettings");

RegisterDependencies();
}

/// <summary>
/// Registers the dependencies.
/// </summary>
public static void RegisterDependencies()
{
svcSupport.DependOn("com.google.android.gms",
"play-services-games",
PluginVersion.PlayServicesVersionConstraint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,11 @@ public void LoadAchievementDescriptions(Action<IAchievementDescription[]> 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 =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames
{
using System;
using System.Collections;
using GooglePlayGames.OurUtils;
using UnityEngine;
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions source/PluginDev/Assets/GooglePlayGames/OurUtils/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.OurUtils
{
Expand Down Expand Up @@ -88,4 +87,4 @@ private static string ToLogMessage(string prefix, string logType, string msg)
}
}
}
#endif

2 changes: 0 additions & 2 deletions source/PluginDev/Assets/GooglePlayGames/OurUtils/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

namespace GooglePlayGames.OurUtils
{
Expand Down Expand Up @@ -99,4 +98,3 @@ public static T CheckNotNull<T>(T value, string paramName)
}
}
}
#endif
2 changes: 1 addition & 1 deletion source/PluginDev/Assets/GooglePlayGames/PluginVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit eb4d8f1

Please sign in to comment.