Comments (6)
FYI, also had this issue with the GetUserDisplayName function.
My workaround/hack at the moment is to cache the user ID and display name in Unity after retrieving them for the first time, instead of calling down to native each time. I'm not too happy about that solution, and it is a bit unsettling because the GPGPlayer instance being deallocated seems to occur just a couple seconds after log in...not sure why it is being deallocated.
from play-games-plugin-for-unity.
I've also found that using the following sort of code in the "playerId" property in GPGSManager.m seems to work well:
- (NSString*) playerId
{
GPGPlayerModel *playerModel = [[[GPGManager sharedInstance] applicationModel] player];
GPGPlayer *localPlayer = playerModel.localPlayer;
return localPlayer.playerId;
}
Is there a problem with doing it this way? It seems that GPGPlayer is deallocated after being created at sign in, so retrieving the player object again on demand might do the trick. But I'm not so hot with obj-c, so maybe this is a terrible way to do things.
from play-games-plugin-for-unity.
I'm wondering if perhaps the right answer here would be to declare this as a "copy" style property. Seems odd that the playerID would be deallocated though, because you still have a strong pointer pointing to it (even if its parent object goes away.) But let me chat with Bruno and we can investigate...
from play-games-plugin-for-unity.
I had this issue as well, your code seems to have moved the error elsewhere. The SDK still crashes on sign in though.
from play-games-plugin-for-unity.
Will fix this soon! Thanks for reporting.
[internal tracking# 12836745]
from play-games-plugin-for-unity.
Fixed on release 0.8.01.
from play-games-plugin-for-unity.
Related Issues (20)
- Gradle build failed 403 on amazon .pom HOT 2
- Error when building for IOS even with NO_GPGS
- [Bug] APK crashes after using PlayGamesSignIn in Unity Editor Version 2023.2.0f1 HOT 2
- Sign-In Dialog is shown every time .Authenticate is called when Google Play Games App is not installed
- Unity authentication won´t work
- Request plugin for godot 4
- Detect username change in Play Games app
- When will the version with the recall API be distributed?
- AppUpdateRequest is never Done after user minimizes app and reopens it through app drawer
- Unity Editor 2022.3.16f1 (LTS) project build Failed HOT 8
- play-games-pulugin-for-unity
- Bug reports
- Remove Plugin Completely
- Known vulnerability detected
- Unity splash Auto Login
- [Bug] Non-secure network connections error
- How would this plugin behave when granular permissions of Google OAuth is enabled? HOT 5
- Can someone share sample for google play login? HOT 2
- Authentication failed. Prompt shows 400 Bad Request
- Sign in doesn't work. Returning an error code. HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-games-plugin-for-unity.