Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity 5.5f3 - Google Play Services issue - won't compile.

Discussion in 'Editor & General Support' started by screenname_taken, Nov 30, 2016.

  1. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    Same project was fine with 5.4, now 5.5 is giving me:
    "Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs(41,18): error CS0535: `GooglePlayGames.PlayGamesPlatform' does not implement interface member `UnityEngine.SocialPlatforms.ISocialPlatform.Authenticate(UnityEngine.SocialPlatforms.ILocalUser, System.Action<bool,string>)'"

    And of course that is not my file, but Google's plugin for unity.
    Dunno what you changed in the social class, but it broke things.
    I would expect this from Beta, but not from a final release. I do wish that the updates wouldn't brake something for once. I did try to re-import the file of course, and i did check and i have the latest package for the plugin.

    It of course broke lightmaps, but those can be easily rebaked.
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,555
    Not sure if this was added in Unity 5.5, but the ISocialPlatform interface now looks like this:
    Code (CSharp):
    1. public interface ISocialPlatform
    2. {
    3.     // Methods
    4.     void Authenticate(ILocalUser user, Action<bool> callback);
    5.     void Authenticate(ILocalUser user, Action<bool, string> callback);
    6.     IAchievement CreateAchievement();
    7.     ILeaderboard CreateLeaderboard();
    8.     bool GetLoading(ILeaderboard board);
    9.     void LoadAchievementDescriptions(Action<IAchievementDescription[]> callback);
    10.     void LoadAchievements(Action<IAchievement[]> callback);
    11.     void LoadFriends(ILocalUser user, Action<bool> callback);
    12.     void LoadScores(string leaderboardID, Action<IScore[]> callback);
    13.     void LoadScores(ILeaderboard board, Action<bool> callback);
    14.     void LoadUsers(string[] userIDs, Action<IUserProfile[]> callback);
    15.     void ReportProgress(string achievementID, double progress, Action<bool> callback);
    16.     void ReportScore(long score, string board, Action<bool> callback);
    17.     void ShowAchievementsUI();
    18.     void ShowLeaderboardUI();
    19.  
    20.     // Properties
    21.     ILocalUser localUser { get; }
    22. }
    This means that any type that implements this interface will have to implement all of these methods / properties.
    If a plugin that is based on this interface didn't add the appropriate method implementations, it will not work with Unity 5.5.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,555
    You can try to add this to PlayGamesPlatform.cs:
    Code (CSharp):
    1. #if UNITY_5_5
    2.  
    3. public void Authenticate(ILocalUser unused, Action<bool, string> callback)
    4. {
    5.     Authenticate(b => callback(b, ""), false);
    6. }
    7.  
    8. #endif
     
  4. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    Thanks, will try as soon as possible.
     
  5. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    @liortal Hm. well, PlayGamePlatform doesn't show compile errors, but now the PlayGamesLocalUser shows two.
    The old one that it doesn't implement the interface, and that Authenticate takes 1 argument.
     
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,555
    Yes it's the same issue, since they also updated the interface that PlayGamesLocalUser implements.
     
  7. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    So i put the same call in that file as well? no need to change something for that one VS the local file?
     
  8. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    Hey, this is a regression and the team is working on a solution.
     
  9. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    @SaraCecilia Ah. the thing was that i'm working on a patch for my project, i guess this can be expected in the next patch? or is it a long wait away?

    Really like the art style of your avatar btw.
     
  10. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    The fix is being done on the Google Play side - I don't have an ETA just yet.


    And thanks re the avatar! It's an early concept of a character in my game :D
     
  11. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663
    @SaraCecilia Ok! Now i'm curious about the game and its theme.
     
  12. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    663