playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 965 forks source link

AndoirdJNYHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead. #3046

Open elritualk opened 3 years ago

elritualk commented 3 years ago

Hi, i'm using Play Games Plugin version 0.10.12 on Unity version 2020.3.2f1. I use cloud load / save feature, and I have this warnings everytime I save or load a game from cloud.

AndroidJNYHelper.GetSignature: using Byte parameters is obsolete, use SByte parameters instead.
AndroidJNIHelper: converting Byte array is obsolete, use SByte array instead.

This messages come after I call:

byte[] data = PlayerManager.Instance.profile.ToBytes();
((PlayGamesPlatform)Social.Active).SavedGame.CommitUpdate(game, updatedMetadata, data, SavedGameWritten);

That calls AndroidSavedGameClient.cs from your plugin:

convertedMetadata.JavaContents.Call<bool>("writeBytes", updatedBinaryData)

When GPGS call this function is when the warnings appears.

For most players, including me, the cloud load / save feature works good anyway. But I got some other players that when try to load a saved game from cloud, they got a 0 bytes of data from:

((PlayGamesPlatform)Social.Active).SavedGame.ReadBinaryData(game, SavedGameLoaded);
public void SavedGameLoaded(SavedGameRequestStatus status, byte[] data) { ... }

What can I do? Thanks.

neetish-borkar commented 3 years ago

It is just a warning. I am getting it too, but my Encoding.ASCII.GetBytes() and Encoding.ASCII.GetString() works fine.

elritualk commented 3 years ago

It is just a warning. I am getting it too, but my Encoding.ASCII.GetBytes() and Encoding.ASCII.GetString() works fine.

Yeah, for most of my players it is just a warning. But for a small part of them its a trouble and I think it may be related with this.

toxikman commented 3 years ago

@ozdemir08 Hi Mehmet, account to github search, there have been 3 issues submitted regarding this logspam warning in Unity 2020. It's been almost 8 months. What's the status on getting this fixed?

kyleyiso commented 2 years ago

same promblem here,and i dont konw how to fix it !!

KyrXtz commented 2 years ago

same promblem here,and i dont konw how to fix it !!

There is nothing to fix on your side, they have to change the parameter of the called method. The most you can do is hide the warning.

Goisak100 commented 2 years ago

@KyrXtz Hello, Hello, I also have the same problem. I think my guess is that it's because CommitUpdate() and ReadBinaryData() use a byte[] parameter. I don't think there is an API that uses sbyte[] instead of byte[]. Is there any way to modify that parameter? Or can you tell me the proper way to hide that warning?

jzapdot commented 2 years ago

Nearly two years later this issue is still present (occurs currently in latest release 0.11.01. When can we expect this to be resolved?

toxikman commented 1 year ago

Nearly two years later this issue is still present (occurs currently in latest release 0.11.01. When can we expect this to be resolved?

I suspect this Unity plug-in is now abandonware. 😞 The documentation copyright still says 2014 and this plug-in was never updated to use packages like the other Google SDKs. Probably best to just make the conversion modifications ourselves. Honestly I'm surprised nobody has submitted a pull request yet.

JVimes commented 1 year ago

I can't find GetSignature or AndoirdJNYHelper in code. Maybe the error originated on server?