-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sign-in callbacks don't work #5
Comments
After some additional testing: Also, _on_player_is_already_connected doesn't get called (I'm trying to call is_player_connected() somewhere after sign_in()). My idea is to use is_player_connected to determine if some score related gui itens will be visible or not. |
Not sure if you have figured this out yet, but for anyone else having this problem it would appear that the function
The Similarly, the callback for
The |
I've ended up releasing my game without using this function. But I would like to use on my next one so, this is extremely useful. |
@cgeadas I have updated Read me. You can check the correct callback. You don't need to provide the id when signing in. Correct signature of the _on_sign_in_success callback is: Please try again and check if it is working now. Keep in mind to download the latest plugin from tag 1.2.0 (https://github.com/cgisca/PGSGP/releases/tag/1.2.0). |
EDIT: I'm submitting an official request to change is_player_connected() to immediately return a result (synchronous) rather than use a callback (asynchronous). I'm encountering an issue where my app works fine when loaded from Android Studio but does not work when installed from the Play Store. The issue is the spaghetti-code I've had to write just because is_player_connected() uses a callback. The problem is normal code branching based upon the return from is_player_connected() can't be used because of the callback strategy. Ideally I should be able to write
|
@cgisca _on_sign_in_success callback is working ok. However, is_player_connected never triggers the callback. |
Actually it doesn't have to use callbacks for everything. I added synchronous versions of is_player_connected(), save_snapshot(), and load_snapshot() to the plug-in Java code. |
@tx350z I (still) don't speak Java :-) so I can't adapt it completely to my needs. Meanwhile, I'll try to deal with the callbacks with a mix of signals and yields - maybe that can work in a manageable way - meaning I'll still be able to understand my code in a few months from now. |
Be aware that yield() will not be included in Godot 4.0. Hopefully there will be something similar to allow cooperative multi-threading. |
@tx350z Thank you for the heads up. I was not aware of that change. I really hope they come up with something useful - sometime those guys are so short-sighted... :-( |
I can not a find a signal for this... |
The module works, I sign-in, submit and retrieve leaderboard score successfully. Yet, sign-in and is_player_connected callbacks don't work. I've tried some simple print("something") statements and no output. Leaderboard submission callbacks work - I get feedback from the print statement approach.
The text was updated successfully, but these errors were encountered: