{"id":13590144,"url":"https://github.com/playgameservices/play-games-plugin-for-unity","last_synced_at":"2025-05-14T00:06:43.147Z","repository":{"id":12407759,"uuid":"15061404","full_name":"playgameservices/play-games-plugin-for-unity","owner":"playgameservices","description":"Google Play Games plugin for Unity","archived":false,"fork":false,"pushed_at":"2024-11-27T00:53:59.000Z","size":1775462,"stargazers_count":3527,"open_issues_count":748,"forks_count":970,"subscribers_count":269,"default_branch":"master","last_synced_at":"2025-04-10T02:16:55.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/playgameservices.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SupportFiles/Public/PlayGamesPluginSupport/CMakeLists.txt","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-09T22:55:07.000Z","updated_at":"2025-04-07T14:36:05.000Z","dependencies_parsed_at":"2023-02-11T07:30:30.249Z","dependency_job_id":"48190286-1cae-4a42-af44-e9c7de9627fa","html_url":"https://github.com/playgameservices/play-games-plugin-for-unity","commit_stats":null,"previous_names":[],"tags_count":156,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playgameservices%2Fplay-games-plugin-for-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playgameservices%2Fplay-games-plugin-for-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playgameservices%2Fplay-games-plugin-for-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playgameservices%2Fplay-games-plugin-for-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/playgameservices","download_url":"https://codeload.github.com/playgameservices/play-games-plugin-for-unity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142907,"owners_count":21054672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:00:40.145Z","updated_at":"2025-04-10T02:17:02.453Z","avatar_url":"https://github.com/playgameservices.png","language":"C#","funding_links":[],"categories":["Open Source Repositories","C#","C# #","C\\#","others","Open Source Packages"],"sub_categories":["Services"],"readme":"# Google Play Games plugin for Unity\n_Copyright (c) 2014 Google Inc. All rights reserved._\n\nThe Google Play Games plugin for Unity\u0026reg; is an open-source project whose goal\nis to provide a plugin that allows game developers to integrate with\nthe Google Play Games API from a game written in Unity\u0026reg;. However, this project is\nnot in any way endorsed or supervised by Unity Technologies.\n\n_Unity\u0026reg; is a trademark of Unity Technologies._\n\n_iOS is a trademark of Apple, Inc._\n\n## Downloads\n\nPlease download the package from the [Github release page](https://github.com/playgameservices/play-games-plugin-for-unity/releases).\n\n## Overview\n\nThe Google Play Games plugin for Unity allows you to access the Google Play Games\nAPI through Unity's [social interface](http://docs.unity3d.com/Documentation/ScriptReference/Social.html).\nThe plugin provides support for the\nfollowing features of the Google Play Games API:\u003cbr/\u003e\n\n* sign in\n* friends\n* unlock/reveal/increment achievement\n* post score to leaderboard\n* cloud save read/write\n* show built-in achievement/leaderboards UI\n* events\n* [nearby connections](NEARBY.md)\n\n__NOTICE__: This version of the plugin no longer supports iOS.  Google Play games services for iOS is deprecated,\nand is not likely to function as expected. Do not use Google Play games\nservices for iOS in new apps. See the [deprecation announcement](https://android-developers.googleblog.com/2017/04/focusing-our-google-play-games-services.html) blog post for more details.\n\nFeatures:\n\n* easy GUI-oriented project setup (integrated into the Unity GUI)\n* no need to override/customize the player Activity\n* no need to override/customize AndroidManifest.xml\n\n## Documentation\n\nFor instructions on using the plugin, please refer to [this developer guide](https://developer.android.com/games/pgs/unity/unity-start).\n\nFor a sample application demonstrating how to use Google Play Games see [SmokeTest](https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/Samples/SmokeTest) project;\n\n\n## Upgrading\n\nIf you have already integrated your project with a previous version of the\nplugin and wish to upgrade to a new version, please refer to the\n[upgrade instructions](UPGRADING.txt).\n\n## Retrieving server authentication codes ##\nIn order to access Google APIs on a backend web server on behalf of the current\nplayer, you need to get an authentication code from the client application and\npass this to your web server application.  This code can then be exchanged for\nan access token to make calls to the various APIs.\nFor more details on this flow see: [Google Sign-In for Websites](https://developers.google.com/identity/sign-in/web/server-side-flow).\n\nTo get the Server Auth code:\n1. Configure the web client Id of the web application linked to your game in the\n   Play Game Console.\n2. Call `PlayGamesClientConfiguration.Builder.RequestServerAuthCode(false)` when\n   creating the configuration.\n3. Call `PlayGamesPlatform.Instance.GetServerAuthCode()` once the player is authenticated.\n4. Pass this code to your server application.\n\n```csharp\n  PlayGamesPlatform.Instance.RequestServerSideAccess(\n    /* forceRefreshToken= */ false,\n    code -\u003e {\n      // send code to server\n    });\n```\n\n## Decreasing apk size\n\nIt is possible to decrease the size of the Play Games Services Unity Plugin by removing code for the Play Games Services features that your game doesn’t use by using Proguard. Proguard will remove the Play Games Unity plugin code for features that are not used in your game, so your game ships with only the code that is needed and minimizes the size impact of using Play Games Services.\n\nAdditionally, it is possible to reduce the size of the entire Unity project using Unity’s [Managed Code Stripping](https://docs.unity3d.com/Manual/ManagedCodeStripping.html), which will compress your entire project.  This can be used in conjunction with Proguard.\n\n### Play Games Services Proguard configuration\n\n1. Go to `File \u003e Build Settings \u003e Player Settings` and click `Publishing Settings` section. Choose `Proguard` for `Minify \u003e Release`. Then, enable `User Proguard File`. If you want the plugin to be proguarded for debug apks as well, you can choose `Proguard` for `Minify \u003e Debug`.\n2. Copy the content of [the proguard configuration](scripts/proguard.txt) into `Assets/Plugins/Android/proguard-user.txt`.\n\n## (Advanced) Using the Plugin Without Overriding the Default Social Platform\n\nWhen you call `PlayGamesPlatform.Activate`, Google Play Games becomes your default social platform implementation, which means that static calls to methods in `Social` and `Social.Active` will be carried out by the Google Play Games plugin. This is the desired behavior for most games using the plugin.\n\nHowever, if for some reason you wish to keep the default implementation accessible (for example, to use it to submit achievements and leaderboards to a different social platform), you can use the Google Play Games plugin without overriding the default one. To do this:\n\n1. Do not call `PlayGamesPlatform.Activate`\n2. If `Xyz` is the name of a method you wish to call on the `Social` class, do not call `Social.Xyz`. Instead, call `PlayGamesPlatform.Instance.Xyz`\n3. Do not use `Social.Active` when interacting with Google Play Games. Instead, use `PlayGamesPlatform.Instance`.\n\nThat way, you can even submit scores and achievements simultaneously to two or more social platforms:\n\n```csharp\n    // Submit achievement to original default social platform\n    Social.ReportProgress(\"MyAchievementIdHere\", 100.0f, callback);\n\n    // Submit achievement to Google Play\n    PlayGamesPlatform.Instance.ReportProgress(\"MyGooglePlayAchievementIdHere\", 100.0f, callback);\n```\n\n## Special Thanks\n\nThis section lists people who have contributed to this project by writing code, improving documentation or fixing bugs.\n\n* [Dgizusse](https://github.com/Dgizusse) for figuring out that setting JAVA_HOME is necessary on Windows.\n* [antonlicht](https://github.com/antonlicht) for fixing a bug with the parameter type of showErrorDialog on the support library.\n* [pR0Ps](https://github.com/pR0Ps) for fixing an issue where OnAchievementsLoaded was not accepting an OPERATION_DEFERRED result code as a success.\n* [friikyeu](https://github.com/friikyeu) for helping debug [an issue](https://github.com/playgameservices/play-games-plugin-for-unity/issues/25) that caused API calls to be queued up rather than executed even when connected.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaygameservices%2Fplay-games-plugin-for-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaygameservices%2Fplay-games-plugin-for-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaygameservices%2Fplay-games-plugin-for-unity/lists"}