Giter Club home page Giter Club logo

Comments (10)

Gjjansen avatar Gjjansen commented on July 21, 2024

Hello,

Are you using Java or C#?

If you're using Java, you have to call it this way:

function Start() {
Social.localUser.Authenticate(authUser);
}

function authUser(success : boolean) {
if(success) {
Debug.Log("Authentication succeeded!");
} else {
Debug.Log("Authentication failed!");
}
}
Kind regards,
Gjjansen

from play-games-plugin-for-unity.

darkofmarin avatar darkofmarin commented on July 21, 2024

Thank you answer

but not solved

May be setting problem. I try to setting change.

I still not solve..

from play-games-plugin-for-unity.

jdebono avatar jdebono commented on July 21, 2024

I have the same Problem.
Looks like "activity.Call("runOnUiThread", new AndroidJavaRunnable(action));" is not running.
In my Project, the main Activity is extending UnityPlayerActivity

from play-games-plugin-for-unity.

btco avatar btco commented on July 21, 2024

Just so we can rule out other stuff, does this happen when you build and run the Minimal sample?

from play-games-plugin-for-unity.

jdebono avatar jdebono commented on July 21, 2024

Minimal Sample works fine as it is. Will try to extend the Main Activity and see it the same problem occurs.

from play-games-plugin-for-unity.

jdebono avatar jdebono commented on July 21, 2024

I checked by adding an other plugin that extends the Main Activity in the Minimal Sample and it still worked fine.
The problem is the "activity.Call("runOnUiThread", new AndroidJavaRunnable(action));" is not running in my Project.
As a workaround I made a function in my plugin that creates and return GameHelper which is runOnUiThread from Java.

from play-games-plugin-for-unity.

KamiKaze425 avatar KamiKaze425 commented on July 21, 2024

Do you think you can post your solution? I'm hitting this too, probably because the Facebook Unity plugin overwrites the main activity

from play-games-plugin-for-unity.

jdebono avatar jdebono commented on July 21, 2024

What I did I modified GameHelper.
Line 170
public GameHelper(final Activity activity, final int clientsToUse) {

    activity.runOnUiThread(new Runnable() {         
        @Override
        public void run() {
            mActivity = activity;
            mAppContext = activity.getApplicationContext();
            mRequestedClients = clientsToUse;
            mHandler = new Handler();
        }
    });
}

And in C# I stopped calling the runOnUiThread.

But I'm facing a problem with the background of the activity. When I call the sign in process I'm getting a black background.

from play-games-plugin-for-unity.

jhocking avatar jhocking commented on July 21, 2024

I encountered this same error and eventually figured out the solution is in this thread (more details there) #88

from play-games-plugin-for-unity.

claywilkinson avatar claywilkinson commented on July 21, 2024

closing because it is so old.

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.