Iakobs / godot-google-play-game-services-android-plugin

Android plugin for Godot 3.5.x to integrate Google Play Game Services in your games.
https://godotengine.org/asset-library/asset/1854
MIT License
24 stars 3 forks source link

Some signals not emitted on Godot 3.6 #12

Closed dannygaray60 closed 16 minutes ago

dannygaray60 commented 3 days ago

Hi, thanks for the plugin! I was testing it in godot 3.6 and the Snapshot signals are not emitted.

I have already tested the Sign-in functions and signals work fine, I have not tested the Leaderboards or Events, but trying to use Snapshot the signals do not work, but methods work, for example I can save snapshots or open the dialog popup to select a snapshot.

Iakobs commented 3 days ago

Hi! Thanks for using the plugin! I'm sorry to hear that signals are not working properly. Maybe it's because I haven't updated the plugin to Godot 3.6.

I don't have the bandwith to test it now, but maybe you can try with this version of the aar file of the plugin, which I compiled with Godot 3.6 SDK. Please let me know if this fixes the issue!

dannygaray60 commented 3 days ago

I tried, doesn't work, but if I use load_snapshot directly it emits the signal, so the issue is with the native dialog used to select a snapshot

Iakobs commented 2 days ago

I see, now I know where's the problem. That part is implemented a bit different due to restrictions of the Godot Android SDK. I will try to get a look as soon as I can, but in the meantime, do you see anything relevant in the logs?

If you're curious and you know kotlin and want to give it a look, the flow in the code of the plugin is:

  1. You call the snapshotsShowSavedGames method
  2. That goes to the SnapshotsProxy class, that calls the Google sdk here
  3. That opens the dialog in your game, and when you select a Snapshot, it returns an Intent to the plugin, that is consumed in the onActivityResult method, which in turn, emits the snapshotsGameLoaded signal with the Snapshot.

You should see these logs in logcat while doing all of that:

  1. Showing save games
  2. Loading snapshot with name $fileName.

Let me know if you find anything else, I will keep you posted as well if I find anything!

Iakobs commented 8 hours ago

Hi @dannygaray60 I've found the problem and fixed it! You have a new release of the plugin here. Hope it works now! Let me know if it was fixed so we can close the issue 😄

dannygaray60 commented 20 minutes ago

wow! that was fast, thank you so much! it's working well now! Tested achievements, snapshots, and sign-in, methods and signals working :D

Iakobs commented 16 minutes ago

I'm happy to hear it's working!