Unity LevelPlay easy way [NEW] !! 2023 (Unity, IronSource, AdMob and AppLovin Ads)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys welcome back to another video in this video we are going to implement Unity ads with the mediation so let's get started [Music] so Unity ads with the mediation is called Unity level play as Unity has acquired the iron source so basically in this video we are going to integrate the iron Source ads and we will choose Unity ads Google admob ads and the app loving ads as our ad partners and all together it is called the mediation now basically mediations are of two types one is the waterfall and other is the bidding now the waterfall method is basically a sequential connection of AD networks where if one ad networks fails to show the ads to the user then it will move on to the next ad Network and it will keep doing that until unless a successful ad is being displayed to the user on the other hand bidding is basically an auction based approach in which all the ad networks competes against each other in real time and the highest bidder gets an opportunity to display their ads in front of the user which basically ensures the highest possible returns for the app Developers so now let's move on to our first step and let's create an account in the iron Source dashboard click on get started now in here fill in your details like your name email company name and all the thing it asks for and then click sign up then you will get a confirmation email so simply just confirm your email and after that welcome to the iron Source dashboard now it will ask you to create an app so let's create an app for Android so our app is not live and let me just give it a name Unity level play I will select Android now in our case our app is not directed to children and we will leave this us privacy laws as it is and then click on add app after that we have to select the ads that we want to display in our game so we will select the rewarded interstitial and the banner ads now the offer wall ads are basically a long list of tasks that user has to perform and in exchange of that user gets some rewards but in this video we will not focus on the offer wall ads we will just implement the banner interstitial and the rewarded ads so let's click on continue now iron Source also sends an email in which it asks some more information about us like our bank account number our Swift Code and all the things like that so that it can send us the money after the specific threshold but you can do this later on and for now let's move on to the next step and now let's change our ad units into the testing mode so let me just change it for rewarded interstitial and Banner cool so now let's click on the SDK Network now here we have all the ad networks that iron Source support fortunately we have almost all the ad networks supported for the waterfall as well as for the bidding so now let's start by adding the unity ads now it want an API key and an organizational core ID and we can easily find it in our unities dashboard so now let's open Unity so here I have a very simple scene setup so first let's convert our project to Android foreign scene now click on player setting and we'll change our screen orientation to portrait in the other setting we will change the scripting back end to il-2 CPP and we will take the arm 64. now let's link our project to unity's dashboard and it automatically does that in unity 2022.2 I think and our app is not directed to children and click save now let's open the unity's dashboard select our app click on monetization then click on get started I plan to use the mediation and unity level play is fine click on next yes I want to start fresh bidding is what we want click on next and our app is not live on app store yet and click on ADD project so here we get our app ID as well as the organization core ID so let's just quickly paste it into the iron Source dashboard and click on Save and here we can see the unity has now appeared now we have to click on setup to link our project and the add IDs so it asks a game ID which is there in our unities dashboard so click on the placements and in the top we have the game IDs so here we have our placement ID for rewarded and the interstitial but we don't have any IDs for the banner so let's create one click on ADD add unit then give it a name Banner Android then select Android from the drop down and select Banner for the category then click create and as we can see bidding is not available for the banner ads now give it a placement name and click on ADD placement now let's copy the Android game ID first and paste it inside the iron Source dashboard and now let's copy paste all the placement IDs so let's do it for the rewarded interstitial and Banner now as you can see Unity ads is now active now let's import the iron Source SDK so go down and click Knowledge Center and click iron Source SDK and click on Unity plugin integration so here we will get the download link so just simply click on it and it will download the iron Source SDK now drag and drop it inside your project and click import now it will also ask to import the mobile dependency resolver so just simply click on import now click on adds mediation and integration manager so in here we have all the ad networks that we can install so first we will install the unity ads as we have already integrated it in our dashboard and then click on asset mobile dependency resolver Android resolver and resolve now if it gives you an error of the win32 then simply open this link the link is in the description then copy all the text then right click on assets show in Explorer temp Play service resolver Gradle and inside it create a text document then click somewhere else then open that file and paste all the text inside it now the last step is we have to rename it to the Gradle ew dot bat and then we have to click on yes now right click on assets and click on the re-import click on reload and now if we try to resolve [Music] it will execute without any problem resolution succeeded so click on ok now inside the iron Source folder we have an iron Source demo scene so let's open it up now in this in the main camera we have a demo script for testing the demo ads so before doing anything we will first check that this scene is working or not and if it is working then we will move on to our next steps so if I run it it will show some GUI buttons and as we can see we can show rewarded ads we can load and show the interstitial we can show the banners so we have to just test it inside our device so let's build this let's open this scene in the build setting and remove the older one and now just save it anywhere you like now the APK build is completed but if it gives you any error then try to update your target SDK to the level 33 and if you are using the unity 2022 you will not face any problem in updating the Android SDK so for now let's run our APK so first let's try to load the banner ad it is working fine now let's try to load the interstitial now click on show interstitial it is also working fine and now let's click on the show rewarded ads and it is also working without any problem so that means till now our integration is working perfectly and we can move on to the next steps now back into the unity click on assets mobile dependency resolver Android resolver and click settings now in here we have to check patch main template dot Gradle is set to true if it is not turn it on and then save it and then we will open our player settings and we will turn on the custom main manifest and custom Gradle properties template okay so now let's close this and we have to do some additional steps for the Android as well as for the iOS so let's first do it for the Android now under your assets open your plugin folder and inside that we have our Android manifest file now open it now we have to paste this permission inside our Android manifest file if we are using our Target SDK equal to or greater than 31 which we are doing so we will just copy it and paste it right above the application now save it and close it now for the second step open The Griddle template file and if we are using Unity 2020 plus versions then we have to paste this inside our Gradle template file so let's just copy it paste it right here now save it and close it now with that the additional steps for the Android is completed we only have two steps now let's resolve one more time great now we also have some additional steps for the iOS so now I'm inside my MacBook so first we have to check that we are on the iOS platform then click on assets mobile dependency resolver iOS resolver and click on install cocoa pods after that click on assets reveal in finder and search for info Dot plist and then select your folder now open this file in the xcode so now our first step is done which is installing the cocoa pods now for the Second Step copy SK ad Network items and inside the xcode click Plus now paste it and set type to the array now our second step is complete now for the third step copy SK Ed Network identifier and under the SK ad Network item click plus and make it a dictionary and inside it click plus one more time and paste your SK ad Network identifier and for the value paste in this string with that our third step is completed and we are now left with two more steps now for the second last step copy this entire line and paste it right here and for its value copy this post back link and paste it right here cool now for the last step copy NS app Transport Security and paste it right here then copy NS allowed arbitrary loads and paste it under the security settings and make it a Boolean and set to yes now with that the additional steps for iOS is completed now we can jump back into the windows now in Windows rename the sample scene to ads test as now we will create our own UI to load and show the ads so now let's create some buttons to load and show the banner ads interstitial ads and the rewarded ads and also create a text that will display our total coins which we will give to the player as a reward after the successful rewarded video now let's create an empty game object and name it as ads manager now let's create a script which will do all of this work now inside this script let's paste this which will assign our app key for the Android and in case of the iOS so let's paste our app key from the iron Source dashboard now let's create a start and inside this we will write iron Source dot agent dot valid integration then we will write iron source.agent dot init and we will pass in our app key then create on enable and a function which will print that our SDK is now initialized now to print this automatically we have to write inside the on enable iron Source events dot on SDK initialization completed event and we have to pass in this method now iron Source also wants to keep track of the application pause status so let's create a function for that and let's pass this value to the iron source just like this now with that our initialization is complete and now we can focus into our Banner interstitial and rewarded ads so let's create a region for banner ads and inside this region we will create two function one is load Banner and other is destroy Banner now to load the banner we will write iron Source dot agent dot load banner and inside this we will pass the size and the position so for the size we will write iron Source Banner size dot banner and we have some other sizes too but we will stick for the banner and for the position we will select the bottom position just like this and to destroy the banner we will write ironsource.agent dot destroy Banner now other than this we have some callbacks if you want to know like when the banner is clicked or when the banner is opened and we will copy paste that callbacks from their documentation to save some time so let's open their website copy this Banner events and paste it inside the on enable now we have to paste these functions to so let's copy it again from their website and paste it right below the destroy Banner now for now we will leave it as it is we don't need to keep track of any of the callbacks and with that our Banner is completed now let's create a region for the interstitial ads and we will create two functions just like the banner ads so first we will create for loading testicial and second we will create for show interstitial now to load the interstitial ad we will write ironsource dot agent dot load interstitial and to show the interstitial we will first check that the interstitial ad is ready and to show the interstitial ad we will write ironsource dot agent dot show interstitial and in else we will print the ad is not ready now we have to add the callbacks just like the banner ads so let me just quickly paste it from their website and now we will not print anything as we do not really care about the callbacks right now and with that our intercession is also completed now let's move on to the rewarded ads so let's create a region for that also and inside that we will create two functions one for load rewarded ads and other is for sure rewarded ads now to load the rewarded video we will write ironsource dot agent dot load rewarded video and to show the rewarded video we will first check that our rewarded video is ready or not and if it is ready we will write ironsource dot agent dot show rewarded video and in else we will print that ad is not ready now let's add the callbacks so let's copy this and paste it right here and now let's copy these functions and paste it right below the show rewarded ads now in this case we really care about the callbacks as we have to reward the player for watching this ad so in the last third function we can give the rewards so let me just quickly do that now I have to show this on the screen so let's take the reference of the text so total coin will be equal to the current total coins player pref value and we have to update it on the start as well as when we give rewards to the player now with that our scripting is completed now let's drag and drop our coins text and Link our buttons to their specific functions foreign object name as logger and I will attach my screen logger script now I found this script online I literally don't know from where I get this but this is an amazing script it will print all the debug.logs I mean all the console statements in front of the screen which make it very easy to understand like what is happening so you can just download it and attach it and I will only just tweak some values so it will be nicely readable in the device now let's open the iron Source dashboard and in the non-bidding it says that API failed and it's true as we have only added our IDs for the bidding and we have not added anything for the non-bidding so now let's copy paste all the IDS and the game IDs from the bidding to the non-bidding as well now we will do this because it is possible in some cases when all the bidding values by all the networks is less than the traditional ecpm value so in that case we want our traditional ad to load instead of the bidding ads which will make it a hybrid model in which we have both of the things we have the bidding as well as we have the waterfall so just to be on the safer side we will Implement both of them and now it says that reporting API verified great now let's add the Google admob as well now we can here enter these IDs that it wants but I found that it is simple to just simply log in with this link so just simply click on it select your email and here it says that admob is now linked so click save now just like the unity ads admob is also appeared in the bidding as well as the non-bidding area so we will just fill in whatever it needs from the admob dashboard but we will not use this native ads in this video so now let's open the Google admob Dashboard here you can add an app but I have created an App already to save some time and I have also created some ad units as well now I am not going to show you how to create an app and how to create the ad units as it will take a lot of time but if you want to know about that you can watch my previous video the link is in the description now the only thing that I will tell you while creating the ad units let's say the banner ads so you can enter here the add unit name and after that do click this check box which says that we are using this ad unit for the real-time bidding on some other AD networks platform so I have done this for all these ad units now click on the setup in the Google and it asks for an app ID which we can easily find it right here so let's open the admob dashboard and click on app settings and here we have our app ID copy it and paste it right here now we have to paste our add unit IDs so let me just quickly do that now after that click on Save and as you can see it is also turned blue that means it is also activated now we will do the exact same thing for the non-bidding as well as we are implementing a hybrid model and it is also verified so now let's integrate the app login so it wants a report key so open the app Levin's dashboard and create an account if you don't have one now I already have an account so this is the dashboard and under the accounts if we press the keys so here we can find our all ease like the report Keys the SDK keys and Etc so let's copy the report key and paste it inside the iron Source dashboard and click save Now app login is also appeared in the non-bidding and as we know the app plugin does not support the bidding so we will just use the waterfall model with the app living now if you want to know like what ad networks are supported for the bidding and what networks are not supported for the bidding you can just check out the link in the description now it wants an SDK key so let's copy paste it from the app Levin's dashboard it is right above the report key now it wants the Zone IDs of the rewarded interstitial and banner and I would like to tell you that the Zone IDs are not the traditional ad unit IDs basically the Zone IDs are different from that and the Zone address does not depend upon any app you can just directly create it so in my uploads dashboard if I click the app Discovery and click on zones we have some Zone IDs that I have already created now you don't have to create any app for that you can just directly create the Zone IDs Now to create a Zone IDs just click on this create Zone ID button in here you can give it a name select the platform select the add type and then click save that will create a new Zone ID for you so just like that I have already created a Zone IDs for the banner interstitial and rewarded so I will just copy The Zone IDs so let me just copy for the rewarded ads and paste it right here and let me just do it for the interstitial and for the banner now click save now it says that the reporting API is failed even after we have entered all the correct details but believe me it is just saying that but if we call the applicants add it will run without any problem so I think it is just a small bug but we can ignore it for now now we have done everything that we needed to do in the dashboard now let's jump back into the unity and open the integration manager and let's install the app login as well as the Google admob now click on adds mediation developer settings level play mediation setup and in here we have to add the Android app key and you can paste one for the iOS if you are doing it for both of the platforms and take these three check boxes now go to the ads mediation developer setting and mediated network settings and in here especially for the admob we have to fill in this information so click on enable add mob and fill in the app IDs and you can paste it for the iOS also again if you are doing it for both of the platforms now we always have to resolve after adding any new network so let me just quickly do that and it will resolve without any problem but if it shows you any error and if it's a win32 error you know what to do so in our case the resolution is succeeded now let's build this and check that everything is working properly or not now if we have to check that the integrated networks are working properly or not then we have to do the testing so for that open the iron Source dashboard and click this testing now click on mediation testing and in here we have to add our device so to add a device click on add a new device give it a name and here we have to add our advertising ID so click on settings Google ads and here we have our ID but I think we cannot just copy this so the alternative way is to open the Play Store and download the app slider device ID click on install and here we have our Google advertising ID simply copy it and send it to your device then click save and here we have our device configured successfully so let me plug in my Android device now let's select the app login for the rewarded ads let's select the unity ads for the interstitial and Google bidding for the banner ads now click test in each of them now let's open our app in the Android device first let's click on load rewarded ads now click on show rewarded ads and it is working perfectly I think that it is an app loving ad so let's wait for it to complete and we also got the reward now click on load interstitial and show interstitial and I think it is not working we have to restart the app and we have to do this quite often because this is a live testing now let me try this one more time and here we have our Unity interstitial ad now click on load Banner and here we have the bannerite from the Google bidding so it is also working perfectly now with this our implementation is now finally finished and I have to say that it literally took me two weeks to find out the correct way of doing this so if you stuck in any of the problem or if you got any error feel free to comment it down below and I will also recommend you to watch the Jack Harris tutorial series on the unity level play those are more in-depth videos and those videos will definitely help you out so I will definitely recommend those videos so with that I will see you guys in the next video so thank you so much for watching bye [Music]
Info
Channel: Coco 3D
Views: 24,482
Rating: undefined out of 5
Keywords: Unity LevelPlay, Unity Ironsource, Unity Ads, Unity Mediation, New Unity Ads
Id: sU5njx1jn8w
Channel Id: undefined
Length: 34min 5sec (2045 seconds)
Published: Mon Aug 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.