Exception running command on UI thread

568 Views Asked by At

I add Prime31 plugin for GooglePlayGameServices but it don't want to authenticate and send an error: "Exception running command on UI thread"

if( GUILayout.Button( "Authenticate" ) )
            {
                PlayGameServices.authenticate();
            }

public static void authenticate()
        {
            if( Application.platform != RuntimePlatform.Android )
                return;

            _plugin.Call( "authenticate" );
        }

And I did all this tutorial steps.

1

There are 1 best solutions below

0
On

Please make sure that you are using the Activity Sharing System. And also that The r21 Google Play SDK now requires that you are using JDK 1.7 or newer to compile. It will not compile with older JDK versions. The r21 Play SDK also has a bug with regard to silent authentication. We had to turn off automatic silent authentication in version 2.10 of the plugin due to a bug in the Play SDK. You can use the beginSilentAuthentication method when you are ready to actually authenticate the user or the authenticate method.