Adding ADS to your game with Unity Ads(2023)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there are a couple of structures to implement ads in a game like Appo deal and unity ads in this tutorial we are going to learn how to implement Unity ads in a game first of all open up the unity website create an account or if you already have one login here since I have an account from before I click on sign and enter my account information then it will send an email verification code which I'll paste here after you have entered your information come back to the unity website click on this option and then dashboard on this page again click sign in you can see your account information here up here you can see the pre-created projects click create project here write your Project's name if your game is for kids below 13 set this option to yes to show them kids related ads otherwise set it to no finally click create project from this corner select monetization wait till New Page opens and now click on get started here it tells you what mediation you want to use I choose the right option which is I only want to use Unity ads now press next in this page it asks if you want to use your previous project settings select no then click next now on this page if your game is published you can enter its URL in the section if it is not published it select the right option and click add project on this screen it gives you two codes which we'll need later well now before entering Unity there is another option called add unit click on it on this page you can see different ads it has created for example it is for Android it's for iOS it's manner type it's watch a movie then give a reward type of ads anything these IDs are important for now our work is done here let's go to Unity before you enter Unity make sure to log into your Unity Hub account my Unity version is 2022 124 F1 it's possible that your version is different but in general what we do is the same so up here click on window General services on this page you should install the advertisement package so select and install it I did it before after that click on edit and then project settings from this side under the services subcategories select ads because we built a project before select the lower option in organization select your account and for project select a defined project which for me is called final test now click link project ID and then yes wait a bit till it connects now here it shows created in website game ID let's go for ads I want to create a a button that when I clicked shows an add to me as you saw as learned in previous lectures create a button we need two scripts one for initializing ads and another one for loading and displaying so create these two scripts create an object called ads and assign both scripts to it for the initialization script go to this link here is the complete code copy it and paste it into the created script remember to change the class name to your SC script's name don't forget that it's very very important next SC script is for the As impl again from this link you can Implement any AD you want I want to implement rewarded ads in unity which means it shows the ad and then gives the reward so copy the whole code and paste it into the second script again remember to change the class name to the script's name let's go to the scripts in the initializer script we have a couple of parts in the upper section it initializes if it succeeds this void runs and if it fails to initialize the lower section executes after success it should load the ad in the other script here so we should access it somehow Define the script name as public and assign another name called ads now in this vo where advertisement initialized successfully write ads. load that until the ads get loaded let's go to the ads script we have a button two ID strings which are the ones we got from the website in line 22 disables the button in the load at void loads ads this void runs after ads have loaded successfully show ad void is the most important when we call it it displays the ad now if the ads displayed successfully and we wanted to give the reward to the user we should do it here for example coins or any other stuff if you had problems loading ads this will runs and if a problem occurs in the displaying void another void runs come back to Unity the Android game ID is the given Android game ID by the website we can copy it from edit project settings adds section assign the button to the defined button in the script and assign the ad script to the ads and lastly select the button click this plus assign ads to it and from ads script choose show ad void let's go for test press play first the button is deactivated adds initialize then adds load then the button AC AC Ates now I can click on it if you do all the steps correctly this page will display to you finally remember when you got the license key from Google Play in your Unity panel select the project and enter the license here thanks for [Music] watching
Info
Channel: BudGames
Views: 4,703
Rating: undefined out of 5
Keywords: implement ads in game, use unity ads for game, rewarded ads, monetize your game, unity ads 2023, advertisement in unity game, ads in unity game, make money with game, unity ads tutorial, unity ads setup
Id: 8WXqylFkd2k
Channel Id: undefined
Length: 6min 55sec (415 seconds)
Published: Wed Oct 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.