- Edited
Hello there,
I try to use the GameCenter Plugin, but it not works or rather some unanswered questions. The documentation is not very helpful.
if Engine.has_singleton("GameCenter"):
print("Gamecenter aktiv")
game_center = Engine.get_singleton("GameCenter")
var login = game_center.authenticate()
var result = game_center.post_score({ "score": 100, "category": "birds_4", })
var show = game_center.show_game_center({ "view": "leaderboards", "leaderboard_name": "birds_4" })
else:
print("iOS Game Center plugin is not available on this platform.")
Without the part game_center.authenticate() I get the error "player is nil". With this part the game_center open on iOS. Is there any function to authenticate without open gamecenter?
In the documentation is the dictionary a litte bit unclear. On one section the key called "score" in another section "value".
Furthermore I get the following error:
ERROR: Condition "!p_score.has("score") || !p_score.has("category")" is true. Returned: ERR_INVALID_PARAMETER at: post_score (plugins/gamecenter/game_center.mm:124) - Condition "!p_score.has("score") || !p_score.has("category")" is true. Returned: ERR_INVALID_PARAMETER
Thanks