Giter VIP home page Giter VIP logo

Comments (6)

kromenak avatar kromenak commented on June 13, 2024

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.

kromenak avatar kromenak commented on June 13, 2024

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.

ToddKerpelman avatar ToddKerpelman commented on June 13, 2024

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.

davemm0 avatar davemm0 commented on June 13, 2024

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.

btco avatar btco commented on June 13, 2024

Will fix this soon! Thanks for reporting.

[internal tracking# 12836745]

from play-games-plugin-for-unity.

btco avatar btco commented on June 13, 2024

Fixed on release 0.8.01.

from play-games-plugin-for-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.