This commit does not belong to any branch on this repository, & may belong lớn a fork outside of the repository.

Bạn đang xem: Google play trò chơi

A tag already exists with the provided branch name. Many Git commands accept both tag & branch names, so creating this branch may cause unexpected behavior. Are you sure you want to lớn create this branch?

Launching Visual Studio Code Your codespace will xuất hiện once ready.

There was a problem preparing your codespace, please try again.


iOS is a trademark of Apple, Inc.


The Google Play Games plugin for Unity allows you khổng lồ access the Google Play GamesAPI through Unity"s social interface.The plugin provides tư vấn for thefollowing features of the Google Play Games API:

sign infriendsunlock/reveal/increment achievementpost score to leaderboardcloud save read/writeshow built-in achievement/leaderboards UIevents

NOTICE: This version of the plugin no longer supports iOS. Google Play games services for ios is deprecated,and is not likely to function as expected. Do not use Google Play gamesservices for ios in new apps. See the deprecation announcement blog post for more details.


easy GUI-oriented project setup (integrated into the Unity GUI)no need to override/customize the player Activityno need lớn override/customize AndroidManifest.xml

System requirements:

To deploy on Android:

Android SDKAndroid v4.0 or higherGoogle Play Services library, version 11.6 or above


If you have already integrated your project with a previous version of theplugin and wish to upgrade lớn a new version, please refer to theupgrade instructions.

Configure Your Game

To use the plugin, you must first configure yourgame in theGoogle Play Developer Console. Follow the instructions on creating a client ID.Be particularly careful when entering your package name và yourcertificate fingerprints, since mistakes on those screens can be difficult torecover from.

Copy the game resources from the console

Once you configure at least one resource (event, achievement, or leaderboard),copy the resource configuration from the Google Play Developer Console, và paste itinto the thiết lập configuration in Unity. To lớn get the resources go to the Achievementstab, then click on "Get resources" on the bottom of the list.


Then click the "Android section".


Select all the contents of the resources window, & copy them lớn the clipboard.

Paste the game resources into the plugin cài đặt dialog

Back in Unity, xuất hiện the setup dialog Window > Google Play Games > Setup... > android Setup


Enter the directory to save constants - Enter the folder for the constants file.Constants class name - this is the name of the C# class khổng lồ create, including namespace.Resources Definition - paste the resource data from the Play Games console here.Web client ID - this is the client ID of the linked website app. It is only needed ifyou have a web-based backend for your game và need a server auth code lớn beexchanged for an access token by the backend server, or if you need an id tokenfor the player to lớn make other, non-game, API calls.

The thiết đặt process will configure your trò chơi with the client id & generate aC# class that contains constants for each of your resources.

Setup Checklist

Make sure to vị the following if they are relevant to your game:

Add tester email addresses khổng lồ the testing section of your game on the Play Games Console.The SHA1 fingerprint used to create the linked apk app is from the keystoreused khổng lồ sign the Unity application.

Add Achievements và Leaderboards

Addachievementsandleaderboardsto your trò chơi in the Google Play Developer Console. For each achievement andleaderboard you configure, make sure khổng lồ notethe corresponding achievement ID or leaderboard ID,as those will be needed when making the API calls.Achievement và leaderboard IDs are alphanumeric strings (e.g. "Cgkx9eiuwi8_AQ").

Add Events

Events allow you khổng lồ track user actions in your game & report on them withAnalytics.Read more about how khổng lồ configure và use Events onGame Concepts - Events

Load Your trò chơi Project

Next, load your game project into the Unity editor.

If you vày not have a trò chơi project lớn work with, you can use the Minimal sampleavailable in the samples directory. Using that sample will allow you toquickly chạy thử your cài đặt and make sure you can access the API.

Xem thêm: Hướng Dẫn Cách Chỉnh Mixer Karaoke Hay Nhất, Cách Chỉnh Mixer Karaoke Hay Nhất

If you want to thử nghiệm a larger sample after you are familiar with the plugin,try the CubicPilot game.More information about building the samples can be found in thesamples README file.

Plugin Installation

To download the plugin, clone this Git repository into your tệp tin system (or download it asa ZIP file & unpack it). Then, look for the unitypackage tệp tin inthe current-build directory: