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

GooglePlayGames isn't working when using Proguard to Obfuscate

Discussion in 'Android' started by ionside, Mar 16, 2020.

  1. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    I'm using 2019.2.14f1. I can't go to 2019.3.# at this time because it breaks all my LWRP and post-processing.


    I have published builds of my application on Google play without Minify toggled and GooglePlayGames runs fine - logging in and can view the leaderboard and achievements.

    I then published a version with Minify (Proguard) toggled on. GooglePlaGames no longer logs in, and can't view leaderboard or achievements. Everything else in the app works fine including ads.

    Is there a way to exclude libraries or methods from being Obfuscated, or are there other ways I should be doing this?
     
  2. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    I've been using the Minify integrated into Unity. But I think I need to use something third party to have more control of what's being obfuscated.
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,637
    You have to add excludes to proguard file. Easiest way to do it is to export Android Studio project and modify there.
     
  4. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    Awesome, thanks for the heads up - giving it a shot.