Closed theaveragegeek closed 2 years ago
Calling request_achievements
and request_achievement_descriptions
do not return anything (void
result). They create events, that should be handled by get_pending_event_count
and pop_pending_event
. Example on how to do it is described here: https://docs.godotengine.org/en/stable/tutorials/platform/ios/plugins_for_ios.html#asynchronous-methods
Ah okay, that worked. Sorry, looks like I missed the top part of this documentation, thanks!
Working in Godot Version 3.4.2, and it seems the request_achievements() and request_achievement_descriptions() functions are both not working for me.
Based on the readme and this documentation I'd expect the request_achievements function to make a dictionary containing the names of all the GameCenter achievements and the progress on each one.
However, currently getting an error when using this from Xcode; the value of gc_scores is always null
Here is my code:
This is all from the AppStore.gd script, the init function is called by the ready function of a different script, and the game_center variable is initialized at the beginning of AppStore.gd and is authenticated in the ready function of that script.
The code in the process function is for testing purposes only(I wouldn't want this to be run every frame), but I was thinking maybe the init function was called before the game_center variable finished authenticating, but the "Success" never gets printed.