playMaker

Author Topic: Show Leaderboards  (Read 3085 times)

dvdkss

  • Guest
Show Leaderboards
« on: January 28, 2017, 01:18:09 PM »
I'm using the 'Very Simple Leaderboard' plugin and my problem is that I can't display my google leaderboard with it. It connects to the services at the start, but nothing happens when I hit my 'leaderboard' button. I tried doing it with Stan's Android Native plugin as well, but I was facing the exact same issue.

The way I do it is the following: I create an FSM for my button, add a Mouse Pick 2D Event action, and the button down transition leads to the next state where I add the Show Leaderboard UI action.

Am I doing something wrong, or is it the correct way and something else should be the problem? Again, it didn't work with Android Native either, so I'm sure it's not the plugin's fault.

Please help me if you have done it with any of these plugins, it drive's me crazy.

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Show Leaderboards
« Reply #1 on: November 03, 2017, 11:43:17 PM »
Sorry this is almost a year old, but I have the exact same issue and was wondering if you ever solved it, and what you did to get it to work? I am using Stan's Android Native plugin. Everything is setup correctly on Google Play and I'm using the correct LeaderboardId code.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Show Leaderboards
« Reply #2 on: November 04, 2017, 07:08:52 AM »
Hi,
Did you try if it works in a apk build?
Does the 'Show Leaderboard UI' give some data?
Can you show your fsms/states/actions?

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Show Leaderboards
« Reply #3 on: November 04, 2017, 01:59:16 PM »
Hi thanks for replying. I am testing it on two devices with an apk build.
I attached the states I am using for showing the leaderboards and a logcat from one of the devices I am testing it on.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Show Leaderboards
« Reply #4 on: November 04, 2017, 04:12:10 PM »
Hi, i checked on an older project of mine but i didn't use the Show Leaderboard UI, only the 'show leaderboard'

I think you need to use only one of them and be sure that the 'id' is correct if you use Leaderboard UI.
Have you tried only using 'show leaderboard'


I searched a bit on the unity answers and may this could help :
Quote
Add this in your Android Manifest -
  <activity android:name="com.google.games.bridge.NativeBridgeActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
From this post : https://answers.unity.com/questions/1211515/showing-google-play-game-leaderboard-ui-not-workin.html

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Show Leaderboards
« Reply #5 on: November 04, 2017, 07:02:24 PM »
Thanks for doing some investigating I appreciate it. I made some changes to the FSM and Android manifest. Just waiting for GooglePlay to update my apk and I'll test it out, fingers crossed.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Show Leaderboards
« Reply #6 on: November 04, 2017, 11:57:16 PM »
Hi,
No problem, let me know if you got it to work :)

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Show Leaderboards
« Reply #7 on: November 05, 2017, 01:42:17 AM »
Hey, I've been messing with this on and off all day with no luck. I'm considering just abandoning the leaderboards and achievements.  I think the problem lies in connecting to google play that is where my FSM will get hung up. If I bypass that and just go to showLeaderboard nothing happens as well though. I wish there was a better alternative to Stans Native plugins I've had way too much trouble integrating everything.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Show Leaderboards
« Reply #8 on: November 05, 2017, 09:01:05 AM »
Hi,
yeah you cant bypass that.
Have you setup your app id
and checked "Enable Games API"
I believe that you cant test this in the editor so you need to make some debug states:
make a text ui and after "An_Play Service Connect" do a "ugui text set text" for success and failed event.

if failed there is something wrong with the connection.
if success add An_Leaderboard Load

I do that @ the start of the game (after my intro screen) and i have 'An_Show Leaderboard' on a different fsm.

you can see it on this Gif


Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Show Leaderboards
« Reply #9 on: November 06, 2017, 03:24:05 AM »
Hey thanks for the clear breakdown of your process. All the test I've been doing have been uploaded to the Googleplay store beta testing and I download it on my device from there just to make sure that is not the problem.  The app ID is correct and Enable Games API is checked.  I will play around with this some more as soon as I am able to. 

As an added blessing I just started getting the "Failed to re-package resources. See the Console for details" error which I've had several times in the past... I haven't made any changes that should cause this so I'm sure I will be working this out for a while before I can build and test anything.  I'll let you know when I do and how it goes, thanks again.