user1662292
user1662292

Reputation: 137

Google Play Services not appearing in Unity

I am developing a game using Unity for Android. I have recently downloaded the Plugin from the link: https://github.com/playgameservices/play-games-plugin-for-unity and I am working through the instructions on how to setup.

However, I have encountered an issue at the Plugin Installation section. I have followed this word-for-word:

"To install the plugin, simply open your game project in Unity and import that file into your project's assets, as you would any other Unity package. This is accomplished through the Assets > Import Package > Custom Package menu item (you can also reach this menu it by right-clicking the Assets folder).

Next, make sure your current build platform is set to Android. From File > Build Settings… select Android and click Switch Platform. You should now see a new menu item was added under Window > Google Play Games. If you don't see the new menu items, refresh the assets by clicking Assets > Refresh and try again."

I have followed these instructions. I'm imported the package. Went to the Build Settings (it was already set to Andriod) then I went to locate the menu item - which I couldn't find. I then used the refresh item and I still couldn't find the menu item.

Things I have tried/additional information

Under Assets -> Google Play Resolver -> Resolve / Force Resolve I get a message stating that the resolution is successful.

Using Unity Collab I reverted to a much earlier change (about a week old) and repeated the above.

I started a new project and connected it to the Collab and downloaded all files

Changed the build settings from Android to Windows and then back again.

Re-imported all assets.

Closed and reopened Unity/project.

Created a fresh Unity project and imported Google Play services (this worked and the menu item appeared). I had followed the same instructions.

Copying the files from the above project over the top of my main project.

I also have google Firebase installed which was installed first and has been working fine.

When I originally imported the package Unity began its process of Resolving Android Dependencies as I expected. However, normally when installing Firebase projects it informs you that the process may take several minutes and Unity may be unresponsive. This did not happen this time and after about 40 minutes of waiting Unity was still resolving dependencies . I had no choice but to force quit Unity and retry the import process. However this time there was no resolving dependencies window.

Upvotes: 0

Views: 4554

Answers (1)

user1662292
user1662292

Reputation: 137

After checking the errors in the Unity Log I realised there were a lot of build errors to do with Google Play Services. After comparing the code I downloaded from Git and the code in my Project - it turns out there was a big mismatch. It seems I had a few extra files (such as Quest.cs) and a few files that were out of date (Types.cs was missing a few Enums).

I deleted the entire GooglePlayGames folder in my Assets folder and replaced it with a fresh copy downloaded from Git and IO now get the Google Play Games option from Window.

Upvotes: 1

Related Questions