loicteixeira / gj-unity-api

[MOVED] Game Jolt API wrapper for Unity.
https://github.com/InfectedBytes/gj-unity-api/
MIT License
16 stars 13 forks source link

Leaderboard scores not displaying #65

Closed Derpybunneh closed 7 years ago

Derpybunneh commented 8 years ago

Hello! So I'm making a game with the Game Jolt API, and I have it show the Leaderboard when I click a UI button object. But, when I click the object the leaderboard is not showing the scores. I don't know if this is due to my leaderboard/game being private currently, or i'm not entering the leaderboard code properly.

loicteixeira commented 8 years ago

Are there any scores in already? You can verify this in the GameJolt dashboard. Is there any error in the console?

Derpybunneh commented 8 years ago

Are there any scores in already? You can verify this in the GameJolt dashboard. Is there any error in the console?

I checked and there are scores in it. Also there are no errors in the console. It might be because my game on Game Jolt is hidden. But I don't know for sure...

Derpybunneh commented 8 years ago

Are there any scores in already? You can verify this in the GameJolt dashboard. Is there any error in the console?

After a little messing around, I made a script that displays the leaderboards when I press the enter key on the keyboard. It seems to display the leaderboards sometimes if I press enter, but not always. I have to press it at least twice for it to load. Also, sometimes it will load but then it will refresh it and it'll be blank... I found that if I click on the Leaderboards button I have, then press enter, it'll display the scores.

loicteixeira commented 8 years ago

That's really odd. Would you mind sharing the code (as a gist so we have a nice formatting) you use for that?

Derpybunneh commented 8 years ago

That's really odd. Would you mind sharing the code (as a gist so we have a nice formatting) you use for that?

Well, there isn't really a specific script I used because I used a button UI element which I can program to do stuff without actually going into the script. The UI button has an OnClick() box thing with a plus button I can press to add a condition and an event to trigger.

loicteixeira commented 8 years ago

Right. Unfortunately I'm travelling until early July and don't have a computer to investigate right now. From the top of my head, I can't think of anything causing this sorry.

Derpybunneh commented 8 years ago

Right. Unfortunately I'm travelling until early July and don't have a computer to investigate right now. From the top of my head, I can't think of anything causing this sorry.

Okay. No problem. I made a work around it by just adding some text that says to press enter to display the scores.

loicteixeira commented 8 years ago

Err, I completely forgot about this :( I'll run some tests but I really don't have a clue so far.

ghost commented 8 years ago

Hey, even though this is an older issue, I am experiencing the same, empty scoreboard phenomenon. After testing and checking, my main scoreboard does have data in it, but does not show up on the leaderboard. I am experiencing no errors in the console. I am using the ShowLeaderboards() function upon a UI button press, but it is nested inside of my own buttonPressHandler() function. Is there a current fix to this issue? I do not have the extension prefab in this scene, it is in the first scene.

loicteixeira commented 8 years ago

Umm.. When the window open, can you pause the inspector and try to inspect the tree to see if the data is here but just hidden? I wonder if this isn't related to #36.

ghost commented 8 years ago

Yes, I have found that the "Score View" is disabled. How do / Can I fix this issue?

ghost commented 8 years ago

I found a workaround, I applied a default enabled into the "ScrollView" prefab. Was this a good idea? Is there a better fix? What issues might this cause?

loicteixeira commented 8 years ago

The idea behind hiding it was that when the scores finally come in (with the callback), the list will be resized as the scores are inserted in it which can cause visual glitches. Therefore keeping it hidden until it's all done. With your fix, you might just see that happen but I can't think of anything else.

I'll see what I can do for the next update, until then leave it like this unless you see it causing more problems.

Thanks for your feedback.