playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 953 forks source link

The name 'PlayGamesPlatform' does not exist in the current context #3248

Open Netherzapdos opened 1 year ago

Netherzapdos commented 1 year ago

Describe the bug When making the script for the google sign in, the namespace PlayGamesPlatform doesnt work and so I cannot invoke any methods associated with it.

To Reproduce Steps to reproduce the behavior:

  1. Followed the setup guide.
  2. Used both of the provided code samples (the first one and the Unity version)

Expected behavior

Observed behavior

Screenshots error

Versions

eirikost commented 1 year ago

Have you selected Android in the build settings? If that was the problem you might want check if Android is targeted for the method or the whole class.

#if UNITY_ANDROID
PlayGamesPlatform.Activate();
#endif