I can’t set up google play games for android. After pressing the setup button, I just get “Invalid classname: Object reference not set to an instance of an object.” How can I fix this?
Google Play Games plugin version: 0.10.12
Unity Editior version 2021.3.16f1
No different than every other nullref!
How to fix a NullReferenceException error
https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/
Three steps to success:
Identify what is null ← any other action taken before this step is WASTED TIME
Identify why it is null
Fix that
In the case of Google Play Games, their integration must be followed absolutely to a tee or it won’t work, so you may wish to go back over the steps you did to integrate it.
Kurt-Dekker:
No different than every other nullref!
How to fix a NullReferenceException error
https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/
Three steps to success:
Identify what is null ← any other action taken before this step is WASTED TIME
Identify why it is null
Fix that
In the case of Google Play Games, their integration must be followed absolutely to a tee or it won’t work, so you may wish to go back over the steps you did to integrate it.
still confused how to fix this
Same issue here! it seems its some bug related with the Google Play Games SDK ( at least, it’s last version 0.11.01).
Still can’t find any solution.
Hello, did you find the solution?, I have the same bug, I think maybe is the “Constant class name”, but I don’t know what to write?
It worked for me:
Before importing the unity package for v0.11.1, delete Assets/Plugins/Android/com.google.android.gms.play-services-games-<version_number>.aar and everything under Assets/GooglePlayGames**(THEN RESTART UNITY)** .
You can then follow the regular integration process.
NOTES ON UPGRADING
Note for 0.11.1
The new SDK contains four major changes to increase sign-in success which you
should be aware of:
1. Sign-in is triggered automatically when your game is launched. Creating a
PlayGamesClientConfiguration instance, the initialization and activation of
PlayGamesPlatform are not needed. Just calling
`PlayGamesPlatform.Instance.Authenticate()` will fetch the result of automatic
sign-in.
2. Authentication tokens are now provided using
`PlayGamesPlatform.Instance.requestServerSideAccess()`.
3. Sign-out method is removed, and we will no longer require an in-game button
to sign-in or sign-out of Play Games Services.
4. Extra scopes cannot be requested.
Before importing the unity package for v0.11.1, delete
`Assets/Plugins/Android/com.google.android.gms.play-services-games-<version_number>.aar`
This file has been truncated. show original
What helped me was to run the ExternalDependencyManager again.
Assets → External Dependency Manager → Android Resolver → Delete Resolved Libs
Assets → External Dependency Manager → Android Resolver → Resolve
I change in. - project settings / player / other settings (api compatibility level ) .NET Framework (not Net standard 2.1)
RDBI
November 11, 2025, 1:16am
10
I had originally overidden my package name which might have conflicted with the package name given in the Google Cloud Platform.
After a full restart of my project, it worked.