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

Unfortunately I haven’t used the iOS singleton myself, but looking at the source code and the code you showed, it may be a bug. I’m not sure if the repository is very active, but if you can make a minimum replication project, I would suggest opening a bug on the iOS plugins repository detailing the issue.

@TwistedTwigleg said: Unfortunately I haven’t used the iOS singleton myself, but looking at the source code and the code you showed, it may be a bug. I’m not sure if the repository is very active, but if you can make a minimum replication project, I would suggest opening a bug on the iOS plugins repository detailing the issue.

I created a test project with two function (Game Center und in App purchase). Maybe there is also a bug with the purchase function. These function doesn't work for me too.

https://1drv.ms/u/s!Ah2_A51TSFE1g7k0x5ylXLWFpLmoJQ?e=x1W2lU

Thanks for your help

@TwistedTwigleg said: but if you can make a minimum replication project, I would suggest opening a bug on the iOS plugins repository detailing the issue.

The important part emboldened. Posting it here is not all that useful.

a year later