This sample demonstrates calling all of the APIs in the plugin. It does not attempt to actually use the resources, just to illustrate how to call the APIs and access the results.
On the first screen, there are 2 buttons - Authenticate and Nearby. Nearby connections do not require authentication, so access to this API is immediately available.
Follow the steps here to create your Play Console Project and Google Cloud Project for building SmokeTest APK.
Next steps are to create achievements, leaderboards and events.
-
Create three achievements in play console with exact given name:
-
Create one leaderboard with name -
leaders_in_smoketesting- Default settings -
Create one event with name -
smokingevent- Default settings
- Create a blank Unity project in Unity Hub.
- Import GooglePlayGamesPlugin and SmokeTest unity package
- Assets > Import Package > Custom Package ...
Open Build Settings ( File > Build Settings )
- Choose
Androidand click onSwitch Platform. - Go to
Player Settings > Other Settings- Set the
Package Nameto the one you have given in Play Developer Console - Select a version for
Minimum API Level. - Set
Scripting BackendtoIL2CPP - Set
Target ArchitecturestoARM64
- Set the
- Go to
Player Settings > Publishing Settings- Go to
Keystore Mangerand create a new SHA1 if you don't have any existing one. - If you already have an existing keystore and SHA1 certificate set that at your custom keystore and use the required key.
- Copy the SHA1 use have set in your Unity Hub and paste it into the
Credentialssection in Google cloud console - here
- Go to
This setup is required to connect Play Developer Console AndroidManifest.xml
file with Unity Project
- Go to Play Developer Console and copy the
AndroidManifest.xmlfromGrow > Play Games Services > Setup and Management > Configuration. - Go to
Window > Google Play Games > Setup > Android Setup. - Paste the copied xml file into text area.
- Fill the text field for
Constants class namewithSmokeTest.Scripts.GPGSIds - Paste the name of your package into Go to
Window > Google Play games > Setup > Nearby Connections Setup
- Open Unity Hub and navigate to file
Assets > SmokeTest > Scripts > GPGSIds.cs. - Replace the constants in that file with the constants present in
Assets > GPGSIds.cs.
The step explains the steps need to upload .aab file and adding testers' Email ID in order to test the SmokeTest
- Add the name of testers under two tabs in Play Developer Console :
- Grow > Play Games Services > Setup and Management > Testers
- Release > Testing > Internal Testing > Testers
- Create .aab file of unity project and upload over
Release > Testing > Internal Testing
NOTE : Create .aab file by go to File > Build settings check the box Build App Bundle ( Google Play ) and click Build.
For testing the apk you should have an android device, make sure to enable developer options in the device and connect with your machine.
- Go to
File > Build Settings. - Click
Build and Run