[Unity] GPGS 구글 플레이 게임 서비스 설정, 로그인,업적,리더보드 만들기 2024

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello. In this video, we will teach you the process of registering an app in Google Console and how to log in, achieve achievements, and apply leaderboards in GPGS 11.01 version . The Unity version used in this video is 22.3.15f1. Settings may vary depending on the version. And the process of registering a developer in Google Console was omitted. First, let’s start with Unity settings. When you create a new project and run Unity, you will see the first screen like this. Select File -> Build Settings at the top left. Since we will be registering with Google, select Android and select Switch Platform. Wait for a moment and when it is done you will see the Unity logo next to your Android. Now click on the Player Settings button at the bottom left to go to the settings window. When you open this window again later, select Edit -> Project Setting and open the window, and the same screen will appear. If you select Player from the list on the left, a screen like this will appear. You can select Android here. Change the Comepany Name at the top. Usually, you can write your company name or a name that represents yourself. For Product Name, you can write the name of the current project or a name of your choice. Now go to the Other Settings list in the settings below. Scroll down to see the Identification settings. Check Override Default Package Name. Then it will open so you can write the Package Name. If you have a name or need to change it later when registering in Google Console, you can change the name here. Target API Level is currently required to be version 33 in Google Console, so you can select version 33. If you need to upgrade the version in the future, you can edit the version here. Next, set the configuration. Change Scripting Backend to Mono -> IL2CPP. Go to Target Architectures below. Check ARM64 here. You have now completed the basic settings in Other Settings. Select Publishing Settings at the bottom. You need to register a key store here, but if you have an existing one, you can register it. If you are making this for the first time, you will need to create a key. Click the Keystore Manager button. The Keystore Manager window will appear, where you can create a key. Click the Keystore button on the left. Select Create New and select Anywhere. Then, a folder will be created where you want to save the key, and you can write a name of your choice or save it as is. If you lose this key, it will be very difficult to find it later, so please keep it safe. If you save it, you will see where the key is located. All you need to fill out here are two passwords. First, enter your desired password in Password above. Below that, re-write the password you just created in Confirm Password. You must write the content in the following New Key Values. Write the name you want in Alias. Enter your desired password in Password below. The password may be the same as above, but we recommend that you use a different password if possible. Below that, re-write the password you just created in Confirm Password. The remaining items may be filled out or not. Once you're done, click the Add Key button to add it. The following window will appear, select Yes. Now you have completed all the basic settings you need to set up in Unity. Now you need to install the plugin. See more Click the Google Play Games plugin for Unity link in the description box to go to that page. There is v11.01 in Releases in the middle right, select it. You will be taken to a download page and select the source code (zip) below to download the file. Once downloaded, unzip the file. When you go to that folder, select the current-build folder. There is a Plugin package here, install it by dragging this file into Unity. Then, the Import screen will appear as shown below, and click the Import button to install. When installation is complete, the following window will appear and click the Enable button. Lastly, Resolving will be done, and if it is 100% completed, some people will see a success window, but some people will be stuck like this. If it freezes like this, close the window. If you look at the console, you will see an error like this: Some people may not have this error. Let me fix this error. Select Edit -> Project Settings at the top left of Unity. On Android, select Other Settings. Find Configuration below. In Allow downloads over HTTP, change Not allowed to Always allowed. And close the window. This will remove that error. At the top left, select Assets -> External Dependency Manager -> Android Resolver -> Force Resolve. Some people will resolve normally, while others will have no reaction. If there is no response, go to the Assets -> GooglePlayGames folder in the Project folder. If you open the folder below, you will find an Editor folder. Select this folder, right-click and select Show in Explorer. When you open the folder, you will be moved to the Editor folder. There is a GooglePlayGamesPluginDependencies.xml file, select this file and open it with notepad. It will come up as follows, and if you look closely at the repository here, you can see that you need to specify the path. Remove Packages here and when you see the folder, copy and change Assets/GooglePlayGames. You can change the folder path to a slush character. Now save and close what you wrote. Coming back to Unity. Some people can apply it right here, but for those who can't, save the project like this and reconnect. When you reconnect, resolving will proceed automatically as follows. If everything is complete, proceed one more time. At the top left, select Assets -> External Dependency Manager -> Android Resolver -> Force Resolve. When completed successfully, a window will appear indicating success as shown below. Now click on OK button to close. Now that everything is ready, let's build it. Select File -> build Settings. Since Scenes is empty, add SampleScene by dragging it. Since we will be registering with Google, check Build App Bundle. Since you reconnected, you need to rewrite the password in the key store. Select Player Settings on the left. Write your password at the bottom. Close the window and now click on Build button. You need to decide where to save the file. Create the desired folder and name and build it. When the build is complete, the following window will appear. Since it is not registered as a Google service, ignore it and click the OK button. Now that the build has been completed and the file has been created, let's register it in Google Console. Open the Google Play Console. Click Create App on the main screen to create an app. For the app name, just write the name you want to create. You can select the default language of your choice. Select a game from Apps or Games. In Paid or Free, you can choose whether to distribute the app for free or for a fee. In the declaration, first-time launchers will have a Play App signature. Select all. Now that you're done, click Create App. You will now be taken to the settings screen for the app you created. Let me explain the launch part. If you are officially releasing the app right away, you can register the app as production and distribute it. However, because you need to conduct sufficient testing before releasing, it is recommended that you select one from the test list and release it sequentially. Public testing allows any user to download and test your app. Private tests can only be tested by testers designated by the developer. Internal testing can only be done by developers or designated testers. Public and private testing can be done only after a certain period of time has passed after registering the app, but internal testing has the advantage of being able to be checked immediately after registering the app. First select Internal Test. When you see the to-do list on the left, it tells you to select Tester. Click Select Tester. Here you can select your tester if you have pre-registered. If you haven't already registered, click Create email list. The following window will appear and register the tester here. When you're done, select your tester and click Save. Scroll up and click Create new version. I can't upload the file, but it says I need to provide a signing key before doing so. Click Select Signing Key. The following window will pop up, and click Use Google-generated key. After some time, you will now be able to upload. Add the file you built earlier by dragging it to AppBundle. Once upload is complete, click the Next button. It says there is a problem with your version, but I ignore it and click the Save and Release button. The release screen will appear, and if it is marked as provided to internal testers, it will be completed normally. Scroll down the list and go to Play Games Services. From there, select Settings and administration and select Settings below. Here, select Create a new Play Games Services project. Select Create new cloud project. The following window will appear and click the Finish button. If you click Select Cloud Project, the project will appear. If you do not see it, click Refresh Cloud Project to make it appear. Click the Enable button at the bottom right. If you do not have a cloud project to use, you can create a new one. When you access Google Cloud Platform, click on the project name in the upper left corner. A project selection window will appear and select New Project on the right. Then, a screen where you can create a new project will appear. Enter a project name and click the Create button to create it. There is a set quota, and if you use up the quota, you can request a quota increase or delete the project. Go back to the settings screen. It asks you to configure the OAuth consent screen in the properties below. Click View in Google Cloud Platform at the top right. Select OAuth Consent Screen from the list on the left. A consent screen will appear, select External and click the Create button. In App Name, write a name for your app. User support email write your own email. Scroll down and write your email in the developer contact information. When you are done, click the Save and Continue button. Since we will use the default range, click the Save and Continue button. Test users can just skip this, so click the Save and Continue button. Now that you're done, scroll down and click the Return to Dashboard button. We will continue to register this window, so leave it as is and move to the Google Console window. In Properties, click the Refresh button below. You are now able to register. Click the Add Credentials button on the right. Under Type, first select Game Server. In the authentication below, it is not displayed because nothing has been created. Go to the Google Cloud window you opened earlier. Select Credentials from the list on the left. Click the Create Credentials button at the top. Select your OAuth client ID from the list. The creation screen will appear and select the application type. Select your web application from the list. You can change the name or leave it as is. Click the Create button below to create it. A window will pop up saying it has been created as shown below, and click the OK button. Go back to the Google Console window. Click Refresh OAuth Client. Then you will see the web client you just created and select it. Click the Save Changes button at the bottom right to save. Click Settings on the left to return to the settings screen. If you look at the properties, you will see that the game server has been added to the list. Now let's add Android. Click the Add Credentials button. Select Android this time under Type. In the authentication below, it is not displayed because nothing has been created. Click the Create OAuth Client button. Leave this window open and navigate to the Google Cloud window you opened earlier. Select Credentials from the list on the left. Click the Create Credentials button at the top. Select your OAuth client ID from the list. The creation screen will appear and select the application type. This time, choose Android. You can change the name or leave it as is. You will need to enter the package name and SHA-1 certificate fingerprint. Go back to Google Console. If you look at the window you opened earlier, there is a fingerprint and package name. Drag the fingerprint to copy it. Go to the Google Cloud window and paste what you just copied into SHA-1 Certificate. Go to Google Console and copy the package name. Go to the Google Cloud window and paste in the package name. Now that you're done, click the Create button below. A window will appear indicating that it has been created, and click the OK button. Go back to Google Console. Close any open windows and click the refresh button. Then, the client you just created will be displayed and select it. Now that you're done, click the Save Changes button. Select Settings on the left again to go to the settings screen. What you just created is your app signing key certificate. Now we need to create an upload key certificate. Since you cannot use the upload key certificate the way we did before, you will need to copy the fingerprint yourself. If you scroll up the list on the left in Google Console, you will find App Signing in Settings. Select this. Scroll down and you will see a list of upload key certificates. Copy the SHA-1 certificate thumbprint from here. Scroll down again from the list on the left and select Settings for Play Games services. Scroll down on the screen and go to Credentials. Click the Add Credentials button. Select Android this time under Type. Under Authentication below, click the Create OAuth Client button. Leave the window open because you'll need to copy the package name later, but navigate to the Google Cloud window. Select Credentials from the list on the left. Click the Create Credentials button at the top. Select your OAuth client ID from the list. The creation screen will appear and select the application type. This time, we select Android again. You can change the name or leave it as is. Paste the fingerprint copied from the upload certificate earlier here. And copy the package name from Google Console earlier and paste it into the package name. Now that you're done, scroll down and click the Create button. A window will appear indicating that it has been created, and click the OK button. Go back to Google Console. Click the Refresh button and the client you just created will be displayed and select it. Now that you're done, click the Save Changes button. Now you have created your user credentials. Finally, go to the Google Cloud window. Select OAuth Consent Screen from the list on the left. In the Publish Status field, there is a button called Publish App, click on it. Then, a window will pop up asking if you want to push as shown below. Click the OK button to change to production. Go back to Google Console. Under Credentials, click View Resources. A resource screen will appear and make sure to copy all of this content. Coming back to Unity. From the top menu, select Window -> Google Play Games -> Setup -> Android setup. The following window will appear, and paste the resources you copied earlier into the large empty space in the center . Go back to Google Console. Now close the Resources window and navigate to the Google Cloud window. Select Credentials from the list on the left. Among the list is a web client. Copy the Client ID from here. Coming back to Unity. Paste the Client ID you copied earlier into the empty space below . Once completed, click the Setup button. Then a window will pop up saying it was successful, and click the OK button to close it. A window will pop up indicating success as shown below. Click the OK button. Resolving was successful, but resolving is done manually again. From the menu, select Assets -> External Dependency Manager -> Android Resolver -> Force Resolver. Once completed, go back to Google Console. If you look at the top of the settings, there is something called Publish Project. Select this. The property asks you to take action on 4 more cases as follows: Click the right arrow button to add it. Write a description. This can be modified later. Please select the game category. For Use Next Generation ID, select Enabled. Select Saved Games as Enabled. You must select this to use the Save to Google section later. Any game icons and graphic images are registered first. This can be modified later. Once everything is registered, click the Save Changes button to save it. Again select Settings on the left and click the Review and Publish button in the top right. When the publishing screen appears, click the Release button at the top right. When the following screen appears, click the Publish Game Project button to publish it. If you check by clicking Settings and it appears as Released in the properties, you can use it normally. From the left menu, select Dashboard at the top of the gel. Scroll down and you will find app settings. Click View tasks here. Let’s enter them one by one. Click Privacy Policy Settings. It tells you to enter the URL where the privacy policy is written. This content is written in my cafe, and you can copy this content, edit it, and add it to your blog or site. If you don't have a good place to register, there is a blogger provided by Google, so I recommend using it. Once everything is written, copy the link to the address where the article was written. Return to Google Console, create the link and click Save. When the following window appears, click the Go to Overview button. Go to your dashboard. Click App Access Permissions. Here, we check that all functions of the app can be used without access restrictions. Click Save. When the following window appears, click the Go to Overview button. Go to your dashboard. Click on the ad. You can choose whether the app has ads or not. Select Yes because we usually insert advertisements. Click Save. When the following window appears, click the Go to Overview button. Go to your dashboard. Select a content rating. When the following screen appears, click the Start Questionnaire button. Write your own email, select the category games and click on the next button. The questionnaire asks what kind of things are included in the app you are planning to release, so you can select the appropriate answer. If you don't understand the question, click Learn More to see the explanation. When complete, click Save. When the following window appears, click the Go to Overview button. Go to your dashboard. Click Target Audience. You need to choose your age group carefully here, but if you are caught or bothered by something, just select 18 years or older. If you go below the age of teenagers, it will be a hassle to have to do something because of child or family-related policies, so I think it is best to do it for teenagers, 13 years or older, if possible. Once you have made your selection, click the Next button. The question here is a bit ambiguous. I chose No because I thought my intention was not to attract attention, but Google sometimes says yes, so it is good to understand this well. Once you have made your selection, click the Next button. Click the Save button and when the next window appears, click the Go to Overview button. The remaining items are simple, so you can choose the answer accordingly. Now let's implement login. Let's create a new folder in the Project folder and name it _My. Let's create a new script and name it GPGS_Manager. Let's create an empty object in the hierarchy and call it GPGS Manager. Add the GPGS_Manager script here. The test screen was made vertical and text was added to display the login button and ID to be displayed when logging in. Let's write the code. Let's create a variable logText for Text that will be displayed in the UI. Create the GPGS_LogIn function. If you look at the Plugin GitHub, there is code related to logging in. First, copy the Using section and paste it into the code. Copy the code from the following Start function and add it to the GPGS_LogIn function. Then copy the rest and add it to your code. A red line appears in SignInSatatus, so you can declare Using GooglePlayGames.BasicApi. In this way, the login is completed. Unlike the previous 10 versions, the code has been simplified. However, the downside is that in version 10 there is logout, so users can log in with a different ID if they want, but logout has disappeared since version 11. It remains to be seen whether this will change as the version goes up in the future. If you need to log out as mentioned above, you must download version 10. If login is successful, you can receive user information. You can get the user's display name by calling the GetUserDisplayName function , and you can get the user's unique ID information by calling the GetUserId function . If you run it and check, you can see that the login and information are being received successfully. Now let's look at how to use achievements and leaderboards. First are the achievements. Click the Create Achievement button. For the name, simply write the name of the achievement to be completed. The description can be written in a description related to the achievement. Step-by-step achievements are completed sequentially rather than all at once . In the initial state, revealing means revealing it right away, and hiding means hiding the achievement without showing it. Points are given when completing an achievement. The easier it is, the lower the score, and the more difficult it is, the higher the score. When you check the achievements for each level, they must be at least 2 or higher. For example, if the number of steps is 2, you can give 1 point when you achieve one situation and give another 1 point when you achieve another situation. Examples include item collection or boss kills. When you have completed the settings, click the Save to Temporary folder button. We will create achievements rather than step-by-step achievements. Click the Create Achievement button. Just write your name and we will give you a higher score. When you have completed the settings, click the Save to Temporary folder button. After creating this, if you release the app as a test, testers can test the achievement. If you plan to make it public after completing the test, click the Review and Publish button at the top to post it. If you say action is needed, just add the necessary parts and release it. They say that action is needed because the description and achievement icon were not registered earlier, so I will fill in that part. Go to the achievement and add a description and icon. Now that you've edited it again, click the Review and Publish button. Once completed, it is ready for release and can be officially released by clicking the release button. Once it is officially released, no further modifications can be made, so please make sure to conduct sufficient testing before releasing it. Click the Release Changes button to release it. Select a leaderboard. Click the Create Leaderboard button to create one. You can write the name you want. You can choose the format as you wish, but I will choose a number. You can set the number of decimal places and choose whatever you want. You can decide the sort order whether you want to start with the highest score or the lowest score. Usually, you choose a high score, and in cases like Time Attack, you choose a low score. Limits can limit the score by setting a minimum and maximum. When you're done, click the Save to Drafts button to save it. You can also post the leaderboard after sufficient testing. I'm going to do that right now, so let's click the Review and Publish button. Unlike achievements, leaderboards do not require descriptions or icons. When finished, click the Release button. Click the Release Changes button. Again, we hope that achievements and leaderboards will be released after sufficient testing. Once everything is done, go to Settings. Go to Credentials in Properties and click the View Resources button. Unlike the first time, you can see that achievements and leaderboards have been added. Copy the entire thing and return to Unity. From the top menu, select Window -> GooglePlayGames -> Setup -> Android setup. Remove the existing resource from the center of the settings window and paste the resource copied earlier. When you see the completion message as shown below, click the OK button. Now let's write the code. Let me make a declaration first. Write using at the top and write UnityEngine.SocialPlatforms. Since we will be applying the coin values ​​to the leaderboard, we will create Text and variables to display the coins. Write a ShowLeaderboardUI function to show the entire leaderboard contents . To call the leaderboard, write the PlayGamesPlatform.Instance.ShowLeaderboardUI function. You must enter the leaderboard value as an argument value. Write the leaderboard ID, leaderboard_coin, to GPGSIds. GPGSIds has leaderboard and achievement ID values ​​written in the resource, so you can simply call them. Write an AddCoin function to add it to the leaderboard. Increase the coin by 1 and display it in the text. Write the PlayGamesPlatform.Instance.ReportScore function. As argument values, the first is coin and the second is leaderboard ID, leaderboard_coin, in GPGSIds. Third, if you want to call an event or function upon success, write it here. If you don't want to call it, just leave it as is. Now let's write down the achievements. Write a ShowAchievementUI function so that all achievements can be displayed . Write the PlayGamesPlatform.Instance.ShowAchievementsUI function. Because it shows the entire achievement, there is no argument value. Write the IncrementGPGSAchievement function to register incremental achievements . Write the PlayGamesPlatform.Instance.IncrementAchievement function. You must register the argument value. The first one writes achievement_gpgs, the achievement ID for each stage, to GPGSIds. The second registers the value to be incremented. In other words, if the total value is 2, it will be completed by increasing it by 1 twice. Third, if you want to call an event or function upon success, write it here. If you don't want to call it, just leave it as is. Write the UnlockingGPGSAchievement function to unlock and reveal achievements . Write the PlayGamesPlatform.Instance.UnlockAchievement function. You must register the argument value. The first writes the achievement unlock ID, achievement_gpgs2, to GPGSIds. Second, if you want to call an event or function upon success, you can write it here. If you don't want to call it, just leave it as is. You can do this because you are completing the achievement right away. Now let’s run it and check. After logging in, click the login button to retrieve user information. If you increase the number of coins and view the leaderboard, you can see that they are registered properly. You can see what the full achievements are. If you additionally click on the step-by-step achievement, the achievement will be completed. Once you unlock the achievement, it will be completed immediately. In this way, we learned how to register an app in Google Console and how to apply GPGS' login, achievements, and leaderboard. This concludes the video. Thank you for watching.
Info
Channel: 더블엘 DoubleL
Views: 2,198
Rating: undefined out of 5
Keywords: 유니티, GPGS, Google, Play, Games, plugin, 로그인, 업적, 리더보드, GPGS로그인만들기, GPGS리더보드, GPGS업적, 개인정보처리방침, 광고, 구글콘솔, 앱만들기, 블로그, GPGS인증서, 인증서, 앱설정, 유니티설정, 11.01, 10.15, 안드로이드
Id: -LVT2Mmk6fw
Channel Id: undefined
Length: 31min 33sec (1893 seconds)
Published: Sun Jan 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.