Make a Flappy Bird Style game in unity with No code with Playmaker and include ads | 8bit Squid | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Make a Flappy Bird Style game in unity with No code with Playmaker and include ads

teacher avatar 8bit Squid

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

12 Lessons (2h)
    • 1. Introduction to the course

    • 2. Lesson 1 Set Up

    • 3. Lesson 2 Player Movement

    • 4. Lesson 3 Spawning Blocks

    • 5. Lesson 4Clean Up and Blockhits

    • 6. Lesson 5 Scoring Points

    • 7. Lesson 6 Game Over Screen

    • 8. Lesson 7 HighScores

    • 9. Lesson 8 Moving Background

    • 10. Lesson 9 Saving, Loading & Title Screen

    • 11. Lesson 10 Sound

    • 12. Lesson 11 Ads

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

In this class you will learn how to create a flappy bird style game in Unity using Playmaker. At the end I will show you how to add ads to your game so if you upload it to the Google Play Store you can make some ad revenue from your game.

You will need:
A decent computer


Meet Your Teacher

Teacher Profile Image

8bit Squid


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction to the course: Hello and welcome to this course on how to make a game in Unity using play maker. So you'd be using no coding whatsoever to make this game. Now, in this course, by the end of the course, you will have a fully working Flappy Bird style game. Just like this here. If I hit play, you will see, and also when you get a game over, it will play an advert. So if you load this to be placed up, there'll be the option of actually making some ad revenue from that. So on the home screen of my title screen, you can turn the sound on and off. This will affect in-game music. So if we hit Play here, it's background music, flapping. The idea is to, you can click these little stars as well to get more points. But obviously the aim is to avoid the blocks which will over time start spawning faster. And we have a nice moving background now as well. And if we hit the next block, whatever it is, if not, we'll get a game over, okay, with it here. We get the game over screen, a high score which will save. And we get into retry. If you choose two, this will be the ads in the game. And if we turn off music, you'll notice now the game runs silently. Okay, So that is the introduction to the course. And hopefully I'll see you in the lessons. 2. Lesson 1 Set Up: Okay, Welcome to Lesson 1. In this one, we are going to be just creating our new project and installing play maker. So we're going to click New Project. And it's a 2D game. So make sure you choose 2D and we'll give it a name. So for me I'm some call it Skill, Share, flappy, click, Create. This will take a few minutes to load, so I'll cut back when this is done. Okay, and now we've got our blank project open. We need to add play maker. So first of all, we're going to go to Assets import package. So this method first is if you have purchased play maker directly from the Hou Tong gains website and you'll probably, I think he's gives you a download. So we'll go to Assets, import package, custom package. And I need to find where it is saved. So for me I have it saved here in my file called Unity. Click Open. And then you just click Import and import. I'm not importing this one. I'm going to use my version from the Asset Store. I don't use this one anymore, is from a friend when we did it together. So I actually bought my own version. So I'm gonna go here. And it's pretty much the same after you've kicked the assets to get out window, to give it a moment to load my assets. Okay. I'll cut back to when it's loaded because it's been it's been ridiculously slow. Okay. So I eventually did load up literally soon as I stopped the recording, it opened. So here we'll just click Import. And now it's just going to be the same step as that. So always gonna go impart. We'll give it a moment. It's going to ask us to install and we'll click Install here. Yes, I've made a backup. It doesn't really matter if you've not, because if something goes wrong, it's a blank project. But let's say bear in mind if you are importing play Mecca to a existing project, make sure that you backup first. And then we're going to click Import again. I believe he's going to ask one more time. Let's see. I think asks one more time to install. If it says iteration when I know it's not going to. All right. So after a few minutes, I didn't ask you to install again. A few minutes, disappear or get there so you can just tick this box so it won't appear again. And you'll find you've got three new files, gizmos, play maker and plugins. And we're just going to click play maker, play Mecca editor, and dock that into here. And then we are ready to start making our game. 3. Lesson 2 Player Movement: Okay, So welcome to the first actual lesson of building the game. So first of all, we need to do is make sure in our project file here. And we're going to add the project files, which is flappy game with file, which will be in the downloads for its costs. We'll just drag that in and let it get imported to our project. And don't worry about this for now. Okay, In fact, I'll include these as a separate download because Audi and he had to leave for now. So don't worry about that era. You want to have it is encoded the ads into that file air, but I shouldn't have done. Alright, so we'll have the scene here. And let's just first of all, get our character into the game. So we're going to go in, we're going to choose the frame one and drag it into our game. And we can scale it down to make them smaller. Now you'll notice that the moment the game is in portraits, we wanted to be in landscape. So we're going to click here and was changed to like that. And it will change to landscape mode, which is what we want. And our bird is still a bit big, so I'll make them a bit smaller just like that. And we're going to rename him. So you can press F2 or you can click here. So I want to press F2 and we're gonna call it player. And we're going to tag the bird as a playlist. Well, so it says tag on Linkedin play out. We'll choose Player. Okay? The next thing we need to do is actually get our bird flapping. So what I'm gonna do is we're going to highlight all eight frames here and drag it onto our player. And your carbs and create new animation. Go to our asset folder. Right-click. Create a new folder called animation. We can then open that and save this as player. And if we actually go to Window Animation, Animation here, let me get it onto the screen. Why is it disappeared? There we go. Okay, here it is. If I hit play, you want to ask now about our bird is moving. Okay? But I've seen now we need to get our bird to actually fall. So today we're going to add two things. First, first of all, we're going to add a polygon collider. So this is actually going to let objects hitters. We're going to need this later, so we're going to add it now. And after we've got the polygon collider, we need to add a Rigid Body 2D. And we just need to make one or two changes here where it says freeze rotation and it's got a zed or z-axis tick that. And then same for free's position on the x. Now the x axis in this case is left to right. Y is up and down. And I see rotation is if I actually rotate it here. You see how he's turning and we don't want that to happen. So I'm going to freeze that one. And now if we hit play, we should notice I'll bird drops. And now we go. So obviously, if we hit play again and I tap on here, nothing is happening because we haven't told the game that we want the bird to flap and fly up. So to do this, you could have literally have a button on the screen to tap to make him flap up. But I think it's actually better to make the whole screen into our touch control. So we're going to add a UI panel. And we're going to call this panel touch. That's not a t control. And you know, it's now about our screen is kind of like cloudy looking. What we can do anyways, where it says the a for alpha. To click on the color here, I'll say make sure you click on touch controls so it's blue. Click on the white bar here for color. And the AD alpha's set it to 0, so it become invisible. And that's sorted. And now this is where we're going to create our first FSM. So we're gonna click on play maker. Make sure you're on here. And we're going to add a state. And what we want this state to do basically is control our bird when we tap the screen. Okay, so for now we're just going to have three states. A good habit to get into. So I'm just going to say FSM. If you have multiple FSM xs on one object, you're going to want to know what they all are. So we're going to call this one tap to flying. And then it'll change the name here. Okay? And then we're gonna give some names to the states. So we're going to call this one on tap. Fly up. I always call this one done. And we're going to need to add some custom events. So we're going to click on Events here. And we're going to have on tap Fly. And last one can you choose to the standard finished? So here we'll add on tap, we'll add fly. And here we'll add finished. It really doesn't matter what you call them at all. Just helps you know what's happening. So on tap it goes to the untapped transition to hear one. I also was to fly when it flies, Danio go to DOM. So let's add our actions. So untap, we're gonna go to the Action Browser and use an UI on Painter click events. And we're going to click on tap. So we're gonna make sure that the click event here matches what's in this box here. And then in fly up, we want to add a set velocity 2D. And now it's gonna say here the gameObject requires a rigid body, cause we're not using the touch control as the object. We're going to choose specify gameObject dot will disappear and this will turn red. And we're just going to drag our player into here, into this box here that go to early. And then we need to decide which way it's going to move. So I'll say if we put on the x, we would move to the right or left, depending if you put minus three, you would move backwards. If you put three huge move forward or one who would move forwards. So we want to use the Y and about five should be okay. And what we want to do next is add a next trim event. Because play making that be quite temperamental, sometimes it will just automatically jump to the next event here when it's done, a lot of times it might not. So it's best to add next room event, tap it to fly so it knows when that's done to go here. And then all we want to do here is weight. And we'll set that to say naught point, naught one seconds finished real time. And now, if we hit play and we tap the screen on here, we'll see Albert now starts to fly. Well, we can fly off the screen. And to fix that, that is really simple. We're going to learn to GameObject, call this one top. Add a component and we want a box collider 2D. And we're going to set all these 200 on position all 0. The most important one here is the z or zed. Because that could affect the actually be invisible. When it's all set, you'll see in a middle of the screen. We're going to click here, edit collider. Click on this button here. Click on one of the boxes and press the ALT, the Alt key on your keyboard. And we can then scale it both sides at the same time. And then we're going to move this just to the top of our screen about here. We can then click on here again, so it's blue, press Control and D to duplicate. We'll call this bottom. And we will put that one on the bottom. And now if we hit Play, you see our bird will not go past that. And we cannot go past that either. So perfect. Okay, so that is part one done. In the next part, we will get some blocks spawning into our game. 4. Lesson 3 Spawning Blocks: Okay, Welcome to part three. In this one, we're gonna get some blocks spawning in and moving across the screen for our bird to avoid. So for this one, we're going to add the images for our blocks. So we've got to the Flappy game. You'll notice we've got For colorful blocks here. We can just drag them onto our scene using a vector. We can scale them down to make them smaller. So I just want to get all of them done. And when you've done them, I just scale them first. So it can happen in different kind of size is like a rectangular shape like that. Maybe a bit bigger. And let's have a slightly larger one. Okay, so once we've got all m, We can just select all of them. So is click here, press Shift, and click on number four. And then we're going to add a box collider 2D. And we're gonna make that a trigger. And then we also need to add a rigid body, rigid body 2D. But this one, where it says gravity scale, we're going to set that to 0. And we're going to constrain the position on the y and constrain the rotation on the z axis. And then are we to do is add an FSM for each of them. So we're going to add is necessary here. And when he two-state, just one state, in fact for this one. And we're going to call this one movement. And we'll set the name here to move. And for this, we're going to set velocity 2D again. And we're going to put on the x minus 3. And in fact, let's do that yet. Let's put it on here. And what we're doing here is we're going to click on this one here where it says none. And we're going to use a new global variable. And we'll call this block speed. And we go Okay For this one. Next time it will automatically add it. Who can new variable and it's put block speed here. Go to variables, click on the cog here and choose Global. Unwise this block speed that set out 2k minus three. Now we're going to do it this way because later on when we make the game more difficult, we don't need to change things on that. And what we can do now is for the Roblox just click Copy Component. So you've got here and copy components. So click on the three dots and then we can just click on all the over three and click about here. And Paste Component as New. Okay? And once we pasted it in there to all three of them is check make sure yeah, it's got movement there. So now they are all ready. And we can just go to Assets, create a new folder. So we're going to create folder. So right-click and create a folder called prefabs. Open it up and we'll put our blocks into here. Just like that. We can then delete these here and we as needed now create a spawner. So we're going to create an empty object, give it a icon, and we'll call this spawner block spawner. Some reason I missed them, the P. And we'll set this up now. So we're going to play maker. And we're going to one. That's why it's not clicked on it. We're going to add 1, 2, 3, 4, 5 for now. So this one will be wait. Here we go. Choose block, spawn, block. Done. And then turn off one. And we're going to create definitely fall events spawn one, span one. Spawn two is born, three. And spawn four. Here. We'll add weight. And it goes. And then we're gonna have done another event called done. Okay, so we're going to have weight here. Wait, willing to choose blocker, choose block. We're going to add spawn block one. Fix the name for that in a second. Spawn to spawn 3 and spawn fall. Let me is fixed a name with that one. The Swan did already, but apparently I keep hitting the M key. Okay? And for now, we'll leave that for the moment. Here. We will add dun, dun, we will have weight and then turn off finished. Don is going to link to here. This is going to link back to here. And we'll set these ones up in a moment. We can actually link that 12 there for now. And technical link that one to that. Now, let's get this one setup first. So here we want to create objects. And then a next frame event. And next one event will go to done. And why it says spawn point drag blocks spanner into here. And we can then use Control C and then paste. Sorry, I've got all of them in there. So let's move these down a bit. And I'm spawn too willing to hear spawn three to 34 to four, and Don will all go to weights. Okay, So here we're gonna put a random weights and we're going to use variables. So click on the boxes here. And we're going to have min time. And here we'll have max time and real time. Go to variables, the COG, global variables. And there's our min time to say false seconds, max time to six seconds. And that means every four to six seconds is gonna go to here, then send it around in a loop. Here, we want to send random event. And because we've got four blocks to impact them for here, and then set the last one to be worn as well. And then this where it says event, put in spawn one, respond to spawn 3 and spawn. And then we can just set up here by choosing an asset's block one. Assets again, Block 2, 3, and 4. Done, we want to say to wait and not random, wait, wait. And we'll say Wait, not 0.5 seconds, and then go to wait. And in fact, let's get rid of that one words make it more simple. And we'll link it back to here and choose real-time. So we've got our spawner sorted, except all the blocks are going to spawn in one place. So let's get the spawn and moving up and down so that the blocks are going to spawn in different places. And so this will create one more empty object. Let's call it targets. And we'll give it an icon, say orange, and put it around a similar place, one closer to the top. And we're going to Control and D or NAT to copy it and put 12 on the bottom. And then on the block spawner. We're going to call this one spawner. And we're going to create one more. This is why we need names. And this one is going to be moved. And we're going to want the force states for this one. Move to one weight, one move to, to wait, to put it like wait to wait one there because you can't have more than one action called wait. And just kind of weird, but never mind a custom events. So moved to that one done. It's gonna go to here, here we'll go to weight. So it's got to act transition, customer events and all the ones you've made. I'm gonna be there. Link it up again, and then it's going to appear here once you've used them for this one. And here, wait. Okay, on this one, we want to move towards and we'll put it in, move towards, well sailors typing it out again. And then we want to wait here and here. So in here moved towards, we are going to tell a block spawner to move towards target one. Finished events it's gonna go to done, then waits, not 0.5 seconds. And got Toto to wait, it's done. Move to, we're gonna move to target brackets, one close bracket. And that's gonna go to done. And then here, not 0.5 weight real-time. Make sure he's got real time as well. It does. Okay, so now if we hit play, hopefully, every four to six seconds or block will span. And we'll see our spawner here moving up and down. We'll hit Play the app. So spawner is moving. And at the moment doesn't seem to be spawning. So let's have a look. Maybe it is stuck somewhere. And that's why here. So we forgot here to hook this up. So weight will go to wait. Okay, let's try again. So it just see it counting down here. And now we go over as one block, waiting again. Now we have another block coming. And at the moment they're actually triggers so our bird or pass through them at the moment. And that's what we're gonna do it the next one, the next class we will do. The blocks are actually clean themselves up, so we're not going to have a huge list of clone blocks there. And when our bird touches a block of the good. 5. Lesson 4Clean Up and Blockhits: All right, so welcome to lesson 4. And in this one we are going to get our blocks to be destroying themselves when they reach a certain point and our bird hits them to restart the level. So actually gained the restart happen is really simple. We're going to go to the blocks and onclick tag. So any of them is fine as Kick tag, I'm going to add a tag, click the Plus and call it a block. And then select all our prefabs. And then use the tag option again and tag them all as a block. On our player. We just want to have two actions. And we're going to call this one. Block. Hits an S1 on trigger. And then here we're going to say where we start. And this is where only need one thing here. We'll put finished, link it to here. And on trigger we want an On Trigger 2D. So trigger 2D event not on trigger. This name dot there. And collide Tag Block send event finished. In restart. We're going to put restart level. So that part is done. Now all we need to do is get our blocks cleaning themselves up when they hit something. So to do this, we're going to create an empty object. Let's reset the position to 0 on all axes. And we're going to add a box collider, 2D. We're going to edit the collider, clicking here on the square box, we're going to click and press the ALT key, scaling up so it's the same size around us, our screen, and that we can move it out. A fair distance is okay. So about that because we're pulling it and move it again later anyway. And this is going to be called our cleaner. And we're going to give it a tag of cleaner as well. Slightly cleaner object again, antagonists to cleaner. And that things job is done. Orange do now is tell a blocks what to do. So we'll go to one of the prefabs. So I'll start with number one. Double-click on it. And it's just going to open a prefab so we can edit it. Got to play maker. We're going to add new FSM. And we'll call this one clean up. And all we want again, it's like the last one is two states are finished. Put it there and we'll call it On Trigger. And was caught this one clean up. And we'll do it nearly exactly the same as what we did with a bird. So on here, we want a trigger 2D events. But this time it's gonna go to the cleaner. And then finished, and I want to do here is tell the object to destroy itself. And then it's done. So we can actually go back out. And we can copy that component again McLean up. So we're going to click Copy Components and choose our over 3 prefabs and Paste Component as New. Now if we have a lot, they all have the cleanup and our cleaner is here. We hit Play. You can see what happens when the blocks hit the cleaner. Actually first, let's make sure we make sure they're cleaner is a trigger. And we're going to press play. And then just wait and see. Okay, watch out blue block when it hits the green line, it should disappear just like that. And now they are cleaning up. And let's make sure what happens when we crash into a block. And you see that again, starts again. Perfect. So very quick that one. And now we have our game we setting when we touch it and are blocked cleaning themselves up. In the next one, we're going to add something so we can actually score some points. 6. Lesson 5 Scoring Points: Okay, Welcome to this one. And in this one we're going to have it so we can actually score some points as well as one other thing we need to do. And that is first of all, we're gonna do now. That made no sense. We're gonna do that. First of all, we're going to choose the bottom and we will give it a tag. Is tag it as a block. So if we actually hit play when we dropped down and touch it, if it is a trigger that is set as a trigger, well, as play and the character should hit it. Again. We'll restart just like that. So that is always do that. Now. Points. First of all, what we're gonna do is we're gonna create an empty object and we're going to call a point tracker and just add an FSM called add points. And I will call at points here. And what we want to do is just do a float add. And we're going to create a new global variable called score. And we'll add 1 every frame per second. And that part is done. Now, we actually want to see that score on our screen. So in our Canvas here, we will add a text object, set this to 0. I can put a few zeros in there. Let's double-click to see it. We're gonna make it bigger. So say 40 in bold. And let's make it a nice vibrant color. So I could green scale using the vector tool. So C for T is a bit small. In fact, let's make sure here on the canvas we choose scale with screen size and you'll see actually gets bigger. Let's try 50. Scale it up again. Okay, there we go. And we can then click on the object here, press the ALT key on our keyboard and choose anchor to vote right to the left, sorry. And I'll jump up there and it will stay there. If you prefer. You could also have it on the right. And in fact, because of my phone, I wanna put it on the right because of cameras. So just like that. And that'll be our score here. And what we need to do is add a new FSM called show scar. Here, set scar. Always need two things in this one, we'll add an action, we're going to have a convert float to shrink. So the numbers here at our float, they asked could be an integer. But in this it's a float. And we're going to convert that flow into a string, which is alphanumerical. Because like flow we cannot see the float. We can only see a string value. So we're gonna put our score here. And when to use a new global variable called score underscore string. And we're here, we're going to put a 0. And this is going to stop it showing decimal points. I wanna do neck every frame. And then we also want to do a UI text, set text. And make sure we choose setText. Make sure that they're convert a float, a string is number one, and we have every frame ticked. Here. We're going to specify it a game object. And we're gonna put in our score text, it would be helpful to actually call this score just like that. And it'll show in there. And it works this text, we're going to click on the box here, use variable. And we're going to set it to our score string every frame. Now with the score text. We want to make sure if it's on the left, we have it aligned to the left. And then the numbers are going to spread out this way. And let's make that bigger. Because if they get along score or high score, we want to go and across the whole screen. Now if we hit Play, you'll see the score is counting up 1 for every second. Okay? And now what I think is we will add. Something to collect. So for this one, we'll go into our flappy game file and we're going to choose the star and drag that on. Now it's going to be a bit big. So we're going to have to scale it down to the smaller. About that size is okay. And let's give it some color because when we have our background, it's going to be harder to see. I think that yellow looks okay. And we're going to add a polygon collider and a rigid body 2D setting of rigid bodies gravity scale to 0, constraining position on the y and rotation on the z. And what I'll do is add first and FSM. And we'll call this movement move there and a name here to movement. And like we did before, we want to do a set velocity 2D. And because we're not going to control this, it's always gonna be the same speed or put a minus three every frame. And that means if we actually hit it, nothing's gonna get slowed down. It doesn't matter in this one about the scholars got to make sure you do it and then add one more FSM with two states on the trigger. I want to say add points. And for this one, we'll just do custom event. Done. Link it to that. And we'll do a trigger 2D events collide tag this time we play send to w1. And in this one we want to do a destroy self and a float, add. And float add. We all choose the score. And we can say add 10 and then destroy self real time. Create a prefab from this. So we'll go to our prefabs folder, drag in the star. We can delete that. It also be a good idea to copy the cleanup. So we're going to copy this component and paste it to our star as well. Phase component there's new. So when it needs to clean, it will destroy itself. And all into now is actually get it spawning into the scene. So we can actually copy our blocks Bonner and just make a few changes. So we'll delete this one here. We can delete these ones here and willing wait to hear. And we'll just put it at a set time on this one to remove the weight and is a random way. So I can put, you know, normal weight. And we'll say every five seconds we want to span the star, goes to wait, spawn point. We'll change the name in a moment. That's changing now. So you'll see we'll put in here star spawner. And just change where it says number one, change it to start. The movement should still work. So what we'll do is just put the position in the start. So target one is that we'll just move it, say, to the bottom. So about the spawner will move differently to our block spawner. Block spawner back to the top. And now kinda be moving in opposites. So let's hit play and see if we get some stars spawning. There's a block. And so far not spawning. So that's just pause it and look at our staffs spawner. On the spawner. Watch what's happening. I'm not sure if he's actually because it's still spawning a block. I don't know why I didn't save the star. There we go. That should fix it. Some reason it didn't save me choosing the star. So let's try again. I fought the box are spawning a bit too frequently. And there's our star, we collect it, we missed it. Never mind. Okay, here comes another one. I think our stars not a trigger. So on the polygon client is make sure it's a trigger. And if we try now, it should all work. And solids law about I hit that, come to mind. Okay, here comes a star. No, because it's not blocking noway, here's a star here. Okay. Yep. And that work we collected it. Okay. Excellent. So that is all working. In the next one, we're going to set up our game over screen. 7. Lesson 6 Game Over Screen: Hey guys, This lesson we're going to be doing our game over screen. And this one is actually drawn in the future because something happened to this lesson, the original one I made. So yeah, this is made after the game is finished. So you'll notice something's in a background walk come later and ACP date. But yeah, we'll get into it and create our game over screen. First of all, we need to go to our Canvas and add a new UI element and add a panel. And we'll call it game over. And you can give me a call. So for mine, I'm just going to have it as a lead core. And what we're gonna do here is we're going to add an FSM to be actual gave of a panel. We'll call this warm. Same game over. And here we'll say stop time. So I want to do is when the ball hits the ground or a block, we want the game to stop moving. So we are going to do an action browser and add scale time. And we're going to set this to 00, is going to completely stop again for moving. Okay. And in a game of a panel and we're going to click on, again. You might click UI text. And we're going to put in here game over. And we're going to set that to say 100. Make it bold central line. And I'm gonna make it white just to stand out. And then we're going to scale it up. It's nice, fine if you want to. Target length ways. I can't remember how I did any original video. But never mind. So you can have it if you prefer, you can have it like that. I'm going to have mine like this and just call it gamma of text. And why she might be good idea is in here to actually activate game object and choose to deactivate, specify game object. And we're going to put our blocks spawner. And then another one as well. Deactivate, specify star spawner as well. Because what you'll find is when you got game over, you know, you can't see them on the side where your spawner is. It's gonna keep spawning the blocks. And it's just going to eventually slow down the game if the game over screen is on there for too long. So as good idea is to deactivate them to stop any slowdown in your game. Game over text. And now we just need to add a button. We're going to have a button and we'll call it our game over bottom. How retry button. And why I capitalize the team. Well, all right, and what you can do is you can have a click on the button a second time. Come on. Now we're going to open the text or you can use the arrow here, go to the text element of it. And this plot. We try. And we'll give that AT in old. Once that's done, we can scale up button to match the size of it and make it a bit bigger, make it easier for people to move it down. And in here, make sure that we are clicking on the retry option. Will add FSM, want to states. And this one will say on top. And we'll choose an event. So if you don't have it, you just put on top of wise best effort. We do have it already on top. And then I always like to as per finished event and link it to that. I don't know why I do less. It's just, I think in past versions of playmate Korea had an issue. If it wasn't, I'm not sure if he's still happens. And we'll call it. We start pay on top. We want to literally have a UI on quintet click events. And we will choose on top. Then in here, we need to first scale time and leave it at one that is normal running time. Then we want to have a scepter flow value. These ones, it doesn't actually matter the order. And we have to set flow value as our score and have that as 0. Now we need to add two more, two or three set flow values in total. Actually, no, we don't die is in a later lesson. So forget that. So yeah, scale time and skull. I have nine scale time first. And then we also want to activate game object. We're not three of those. So first of all, we're going to deactivates our game of a panel. Now it's probably isn't actually necessary. But I like to do it just to be safe. And then we're going to activate the block spawner. And then activate V star spawner. So you can see it out or scale time, deactivate game over panel, activate blocks, Bonner, activate star spawner, score equals 0. This is obviously far set flow value. And the last thing we need to tell these buttons do is we start level. We want it to be last. So that will now work. But obviously we want to show our score. So we're going not to the UI, add text and is put in here, Scott. And I think I think 18 should be okay for it in bold. Not best-fit. Make it as white for myself, choose whatever color you want. So yeah, we'll scale it so it fits in. Poppy just underneath the game over. Now I'm just going to send to it and call this wall, I'm sorry, score text. And then I'm going to add one more text element to the actual score here. I'm going to move it down. In this case, it's been scaled the way. I'm going to fit it across the whole of the screen. And put in, say, 70, center, align it and make it the same color. So white in bold and is putting their Roslyn. And that's a way to fit the whole width of the screen. So that when they get a high score has got plenty of space to show that Scott, I always call it the skull number. No one's doing this one is we'll add one FSM. And we'll call this show Scott. Same for here is push. So Scott, how are we going to do is we've already converted the float value into a string. So we're just going to set it again. You're going to do a UI text set text. You can finally, when it's 10 news owner, if you want to specify GameObject and the highest score in now you can. And then on the box that was his text where it says use valuable, check on that. Globals score string every frame. And that's now done. So we can actually take the box, one, tick the box to make it disappear. We got to our player. Now, hopefully this is similar to what you have already. So you should have it when it hits the block, level, waters can restart. So it should be I think hopefully is on a trigger. Should be Trigger Enter. If you have as collision, that will also work as long as your blocks are triggered, not triggers, which is obviously you can check by going in here. And I can see here box collider 2D is trigger text, so I need to use a trigger 2D event. I think it should be that there had been a while since I film these videos, so I'm not quite sure what it was. So yeah, so unblock hit trigger into 2D event block on heads goes to game over. And I'm going to delete restart level. Obviously to add activate game object. We're going to specify game over panel. And now hopefully you have been working. If we hit Play, we can see an action. So flat, flat, flat block. And there we go. Gameover retry. We go score set to back to 0. That's just make sure it works. Hitting the bottom. Yeah. I'll see you should be so for you, it's been a bit slow for me, but you should be fine for us. It's my computer, I think needing to be shut down after been using it all the way. Well, yeah, so that is the game over screen now working. In the next lesson, which is the past for me, for future for you. You will be doing the high schools. Hopefully this actually all make sense with how it fits in. And I can say something happened to it but fixed now. And thank you for watching this one. Sorry for any convenience it cause people who've been following along with the course already. And I'll see you in the next lesson. 8. Lesson 7 HighScores: Okay, Welcome to this lesson and this one we are going to be doing high schools. This is going to be really, really quick. So we just need to add an empty object and we're going to cause the high school master. And we just need to add three states to this one. We're going to do a scar check. And here we'll have high score. And then no new high score. No highscore is fine. And the events we want high score. No high school. And we're going to add this to here. Hi scholar, know, hi Scott here. And then just match them up. High score today and no, Hi Scott to here. And on this one we're going to do a float compat. And in the first box we want to make into a variable and choose scar and then float to. We're going to a new, a new global variable called high score. If it's equal to, we don't want a new high score. If it's less than, no new high score is greater than high school. Every frame. And then what we're gonna do here is we're going to have a set float value and an activate gameObject onset flow value. We're going to choose in the red box, high score, and then where it says float value. Switch it to do so valuable and choose skull and activate GameObject. We'll come to that in a moment. And then in known high score was going to activate GameObject and on tick the activate box. So this is now a deactivate. And, and we'll go to our game of a panel in here. What's his paws game? We can actually add, activate GameObject here. And we're going to choose specify GameObject, high score master. And then turn on our high score field here. And we can copy Scotland scholar number, duplicate it, and then just move it down and just change the names and stuff so on where the actual display textual pot, high score, and then use our rect tool to scale it up like that. And is F2 and high score for that high score score. And then high score number. All right, And, um, for this one, I'm just going to change one thing on here. We're going to add a convert float to a string. And this time it's going to be high score to a new global variable called high score under scar. Hi, score and the score string. Every frame has said that to 0. Then we're going to set this one here to be high score string every frame. And it's his parent needs to ask so and we can move them around with each other when needed. We're just going to add one more thing and other text element called New. Make it an explanation mark there. Bold, say 30, I think should be big enough. And let's make it green. And we'll just scale it. Maybe that's too small, 50. That's better, I think. And we're going to move this if we center align it on a burner, our high score here, and we're going to disable it and just call it new text. Back to our high school master. Activate game objects, specify GameObject, new text. High-school unknown, you highscore. Specify GameObject. New text will then disable less. On our restart button. We want to activate GameObject. Ticket. On tick the box activates specify GameObject, high score master. And now if we actually deactivate that, we hit Play, it should now work. We need to play two games is to get a decent score here. So see if we can collect a star. And there we go. Okay, it says get that wall and get a game over. So 48. Hi Scott, 48. So it's can die straight away this time. Hopefully this will stay as 48 and a no new high scholar disappear. Here we go. Perfect, That's all working. And that is our high schools now all set up. In the next one, we're gonna get our background sorted out. 9. Lesson 8 Moving Background: Okay, welcome to lesson 7. And in this one we are going to be getting our backgrounds into the game. Now, there are two options. So if we've got a flap again, you could use it as a static background here. But I think that's quite bobbing. So what we're going to actually do with set-up eight moving background. So first of all, let's just focus in on the main camera. Let's double-click on Main Camera and drag background three into here. And then just scale it so that our blue sky is just about there. So just make sure there's nothing no balloon. You can see the light site blue line. So just a bit bigger. I think that's fine. Now, you may notice that our bird is gone missing. So what you do is versus ordering layer. Let's just set up to minus 10. And our bird is back. Now to set this up, Let's just first of all close our player and same with our spawners, will deactivate them for now. And first, let's get our clouds into the game. So we're going to put it on and again, just line it up. So they are just in view. And let's turn off our background here as well. So we can actually get it in perfectly. And we put it down a bit as well. I think that's okay. Okay. Now we're just gonna call it clouds. And we're gonna give it a cloud tag and tag it as clouds. And we need to add a Rigid Body 2D and a polygon collider. 2d the polygon collider, because I mean maps out the shape exactly in what map out. Here. You could choose a box collider that would also work. Okay, for the rigid body, you're going to freeze rotation and a y and zed rotation and set grabbed does go to 0. For the rigid body, the polygon collider is going to be a trigger. And then we're going to add an FSM. This is going to be movement. And we're going to set this to a set velocity 2D. And we can just say minus 3. If I just put minus four for this one, because we want to kind of get kinda parallax effect every frame. And then we're just gonna do one more new FSM. And this is going to be clean up. And we'll do on trigger, destroy south. And we just need literally one. So a finished we'll work that. Okay, and we're gonna do trigger 2D vents. And we're gonna set that to collide with the cleaner tag. Send event finished, destroy self in this one here in real time. Okay? And technically that is now all done. So let's go to Assets, prefabs, and add that to here. And we're going to duplicate it. And when we need to just move it, so it's just touching on there. So if you zoom in, you'll probably notice there's a line there. So it's moving a little bit more. Okay. That looks like it's just okay. Maybe a small amount of overlap, but it shouldn't be very noticeable with our background. And what we need to do now is actually create a cloud spawner. And we're gonna give it an icon. Now it could take a while to actually get it lined up. But if you look wherever he play maker logo is, you want it to be, know why it's not working. I've got to click on it again. You want the dot to be kind of in the middle for the Cloud spawner. And what we're gonna do here is add an object, we're gonna call it spawn clouds. And here was one create object. And we can close that. And we'll spawn. And where it says spawn point is drag the Cloud spawn in there, and then in GameObject, choose our clouds. So that part is now ready. What we do now is tell our cleaner to turn it on. So a good thing to do first is actually make sure that when the clouds are there, our cleaner lines at with it. So I print is a bit far out. So we want it to be about say now, and hopefully then is just touching. They have it, so it's just touching. And we can put that back. Because the whole idea is that we will have our clouds collider touch the cleaner, destroy itself, but then the cleaner will then turn on our Cloud spawner. And we actually need to say about our Cloud Spanner. So back to the cleaner. We're going to add an FSM, call it spawn clouds. We want trigger, activate way to turn off so far events for states, I should say. So it will say on touch, spawned clouds, weights, and turn off. And who's do some custom events, so on touch. So done. It goes to spawn clouds that wants to go to Weights. When weight is done. We'll go to turn off. Turn off is done. We go to the finished. So is create kind of a loop in a map. So touch, we want a trigger 2D event. So trigger 2D events. Collide tag with clouds, send event to done. Here we want to activate gameObject. And then next frame events. And then same here for turn-off next frame events. And activate GameObject. And in weight will actually want it to wait. So on touch got clouds, so spawn clouds. Make sure activate gameObject is first, we're going to turn on the Cloud spawner and then tell it to go to wait, wait, let's say Wait, nought 0.5 seconds. Then it goes to done in real time. Turn off on tick this box specify gameObject, cloud Spanner. Next event is finished as make sure that that is done. Yep. So if we hit play now and I'm guessing the problem here is locked. You can see that, but it could a cloud spawner. This is on minus 22. So that's why we're not seeing any more clouds. So let's hit play. And we just need to move the spawner a little bit, I think. So it's turning it on and try to match it. So if it overlaps a little bit, that is fine. Because with the blue background on, you're probably not going to notice that the overlap. And so let's see now. And there we go. So the first one does have a small gap, so let's just move it a little bit more. Hit Play. And there we go. Now. So you can see a little line will actually turn on background to three. You'll notice now you cannot, you can not even really see that overlying unless you're really looking. So that part is done. Excellent. So let's now get our trees into here. So we're going to have to back into here and choose background image one. And in fact, what we can actually do is unpack the prefab for this one. Duplicates actually not do it that way. So leave it as a variable, paste in another at the prefab. So the clouds pop that in, unpack this one. So we'll choose where's it gone? Unpack prefab. And then we can just change this to like that and then just scale it so it is in seen. And let's set this to 0, okay, parties to minus 2. And we'll put our clouds on minus 3. And then for the clouds are gonna go to override, apply all. Okay. And then on this one was college trees. And give it a trees tag. Hey, we want the same. And for movement we're just going to change the movement. This make it minus three. So they're gonna move at different speeds. And let's make sure it all lines up that. And I think just like that should be okay. All right, and then we can make the prefab out of the trees, duplicate it Control D, and then using the Move tool. Move it along. So it's going to be just touching. Again. If it overlaps, It's better to overlap and to be a gap, I think. And what we can do with this one now is we'll get our Cloud spawner, duplicate that. And we're going to call this now our tree spawner. And we're just going to change the clouds into the trees. Okay, that showed them. So double-check if last time. Okay, and then in our tree spawner, we want to find where our tree is. It's about the same place I think, as turning on and line it up best we can with the existing play maker logo. So now that I can kinda just see about that, okay. Turn it off. And we'll go to our cleaner span Clouds. We're going to copy component and then Paste Component as New and call it spawned trees. And then all we need to do is edit this one. So on touch of trees, we're going to activate our tree spawner. And then here, turn off the tree spawning. So let's deactivate our clouds for now and make sure this is all working with the trees. Hit play. And just keep an eye on this huge gap there. But it does fix itself. No, not there. Okay, so we're just going to move our tree spawner. That way a little bit. Hit play a little bit more. Just a matter of getting it in the right place. Nearly that, a tiny bit more. And then I think we are done. Perfect. Let's have a look. So it seems to be a bit weird with how it is bonding in. And whereas our cleaner. So what we'll do is let's make the trees a bit longer. Like that. Then. Hopefully by now just apply to all. We move this guy back. Let's see how that looks. Being a bit weird with the spawn. Make that a little bit longer than Apply, and then move this one out a bit. Let's see how that looks. Yeah, it's been really weird if how it's doing it is try moving up in mall and see how that works. Spawner, cleaner trees. Next frame, done. Turn it on. Wait. Why? No, 0.5. Don turn off. I don't get why it's being so strange. Okay, so let's just delete the trees here. And actually just thinking there, I think I know the issue, so I'm going to on spawn them. And the actual issue is, if we look, this is the issue. It's the collider, that huge gap there. So she just fix that to be the right size again applied to all and then put out back. This is what I forgot to do. So on this one we're just going go to polygon collider. And on the three dots choose we sat and then is trigger, is triggered again, go to overrides, apply all hit Play. And now that will work, but we're going to have to move the spawner a bit, I think. Okay, It's tried out now. And just to make sure we set collider here, tick that I think just gonna put a tree spawner. Think he wants to go about that. Okay, Let's see how it goes. And now we go. Pony, move it a little bit to the left. Not too much just to get that little gap to go a little bit more and see how it is. And I think then at is dominant. Yep. Oh, you are times where a little gap is showing up, but you can use to keep moving it just to get it done and out so that one should be okay. Hit play. And in my noggin be noticeable when we have got our background or on. So let's turn everything on. I believe that little gap is not going to even be noticeable with everything working. Put it on and hit Play. Yeah. It's barely noticeable, I think that Okay. So that is our background sorted. In the next one we're going to get the game saving, and then the game is almost finished. I've see when you're done, make sure to turn back on the bird and the block and start spawner to get it all working again. And then you can give it a try with the background moving and the blocks. Here. This one is a bit higher actually. So we'll move him down. Move this one down as well, a little bit that up. Okay, make sure you save. And I'll see you in the next one for high score. 10. Lesson 9 Saving, Loading & Title Screen: Okay, so welcome to lesson about saving our high scores. And this one is going to be really easy to do. So first of all, we're going to go to our scenes here and rename our sample scene to, let's just say for now game. And then choose ignore. Next we're going to create, so we're going to right-click Create scene, and it's called us save. And we're going to open this up. Now. If you get a problem and ever I don't know if he's an old versions, but we've won. I'm running Unity 2019 dot for dot 18, F1, C1. Sometimes it says there's no cameras in the scene. If you add them, an exit is not going to save any of it. So don't even try to do anything if it comes up automatically saying no cameras in scene, just close and reopen the project and it'll all be working. So we're just going to add a panel. And I'm just gonna make it black and put the Alpha to 100. And it's done here. This is going to be our Save. And I do it with three states. So first one is going to be save. Now we wanted to wait. And state three is load scene. Okay, so here we're going to say Save. When it's done. We'll go to weight. When weight is finished. Go to that. Okay, now, to save, we want to use player prefs. Set a float, this one here, player prefs that float. And we've only got one. If you've got more, you can put two and you'll have two values to save or more, but we've only got one, so there's one. And you need a key. This is like a password. So I use this because then when x one to be HAB 331641 and then two freefall up like that. And then in value, we're going to choose our hi Scott. And after that we want to do next frame events. Make sure that's after. So it goes player prefs float first, then next frame event to go to done. Here we want to wait. I do this. You may not even need it, but I'd always do it is just to make sure that it's all okay. Because I have two states. Sometimes it doesn't work. And then here, load scene. And for this one we're going to choose instead of at index gonna go by name. I think it's always bad. It's due by name because if you change around the index, you have to change everything. And I showed you the index here. So if we actually add the open scene, CSR 0 versus the index number. So if I want you to load save, I could just type in 0 here if it's on scene out index. But if I change the position and game becomes a 0 and that goes to 0, that will then vote the game instead of save. So I always use by name. Okay, that is now done. We can save that one and we can duplicate the save Control and D on it and rename to load. Open up this one. And all we need to do here is on the load here, the panel. We can change the name to load. Here. To load. We're going to delete set player practice, and we're going to change it to player, prefs, get float. And we just use the same key. If it doesn't have the same key, it's not going to load. So make sure you remember what your key is. If you can't remember, just save and go back and check. And then here we're going to load two title. And that one is now done. Now one more thing we're doing, we're going to duplicate that one more time. I'm call this one splash. And we've got to do here is change. The weights on a put is 23 seconds. And I'm going to change the color here because here I would put my logo. It's normally a red background on my logos are polar, That's going to place my logo in. It will be to match that background. And basically AIS hide the loading of the stats behind my logo being on-screen. So once that is done, also wants to measure it slows the title. We're going to create one more scene called the title. Open that up. And we're going to add a panel. And here we can add a background. So we click on source image. You can choose the background and make the alpha to 100. We can then add some text. Flap P game. To be big. At Canvas, make sure on Canvas is set to scale with screen size. And text is probably going to be a bit smaller without actually okay, it's fine. The text, you have the rec tool to scale it up. Slide that can probably make it 100 actually. And created a top. And change that to title and add a button. This will be our play button. And if we click on the arrow to edit the text here, or you can click on it twice to open it. Play. Let's set the size to say 80. We can then click off it and scale it till we see the play on it like that. Put that in, make it bold. Maybe we can, maybe we made a play button a bit longer. Obviously toggle the button and we have done for this one. So just two states on click. Play game. And we're gonna go to here. Done is fine, finished is fine for that one. Link them together. And what UI onclick are you I am pointer click, Done. And then here load scene. And by name and typing game save. And now if we hit play, we can check it's working. And yeah, actually it's going to give an error because we need to do one more thing. We'll go to File Build Settings and we need to put these into here. Doesn't not know the ADA technically. I do like to go in order of how I want it, splash, title, game, save load, but it doesn't actually matter. Right now. That will all work. We're going to click Play. And you can see now everything working. Okay. So that is now sorted. All we've got left is to add some sounds to our game, which you're doing the last lesson before we add the ads. Okay, so I will see you in the sound lesson. 11. Lesson 10 Sound: Okay, welcome to the last lesson to actually finish the game. And there's actually one thing we forgot to do in last one before we add sound to this one. So just to fix that, now we're gonna go to our game and go to our player. Not play a solid. You want to go to the Canvas GameOver panel, play maker. And make sure we choose our restart button. And on here where it says restart level, we're going to remove that. And in here put load scene instead. And by name, we're going to put in Save. And then that is all we need to do to fix what we didn't do last time. So let's save that and head back to our title screen. Because now we are going to add some sound to our game music. So we're just going to add a button. And we will put in here, turn off and make it a bit bigger, darn it to be huge. And I want to be on one line. Make it bold and say 80. Okay? And we'll put this one just a bit lower, like here. And we'll call this our turn off button. And we're actually going to do this before we do our unbutton, because we can just change a few things by copying it. So we're gonna add States called onclick. And here, turn off. And we'll call this turn off music. And again we choose dawn and finished, and link them up. Then on here we want a UI on Painter click. And then here we're going to do two things. One, a next frame events, and then a set ball value. Okay? And for this one, we're gonna go to new global variable and typing just music. Now I'm rather sudden addition of a slash. And we need to go to variables, global variables, find our music one and take the value of air to be true about our music is on automatically. Next frame of n will go to finished. And we can save that. Then we can duplicate our button and name this our turn on button. And just edit the text to say turn on. And we're gonna do is just untick the box, not that one. So I choose button on tick the box to make it disappear. And then here we're going to set this to a tick here for the ball value and change the name to turn on. And same for here. Turn Mu, turn on music. So that is the button sorted. But what we do now is actually happening what controls the buttons, and we'll call this button master. And we just want free states. And we're gonna have two events called on and off, on and off to here. And link them up. And for state 23 woes, give it finished. And then link it to here. And this time we're gonna say check ball. And here we'll say music is on. And hear music is off. And check ball. We want to do a Ball Test. Now, a ball is basically a true or false statement. And we're gonna choose music. If it's true, we want it to go to turn on, sorry, music is on. And if it's false, music is off. And then here we're going to do a next frame event. And we'll put next term event here as well. And then we want activate game object twice in both of them. And we're done and is make sure that the next term event is below. Our GameObjects is drag it below. So if the music is on, we want to activate the turn-off button and deactivates. By ticking the box here, our turn on button. And in here we're going to do the complete opposite. We're going to deactivate our turn off button. And then here we're going to turn on our turn on button. And then what is my next frame haven't gone for here? Strange. And I've summation next one events are set to finish on both. So now we can actually just check if we hit play, we test a button. I think we haven't hooked that up, so just double-check thing. The issue is here. Yep. So he's need to make sure we do that to W1. Same for this one here. Don play. Okay, there we go. And we actually look at our value. Music is now false, meaning off, click it to turn on. It's now on. So VAT is sorted data. And now we just need to add the music to our game. So let's go to our game view. And in fact, what we can do is where it says button master. Let's make that into a prefab so we don't have to do it again. So I'll put out that and then unpack here. Because we're going to delete this row and we are done with it. So we'll go to our scenes game, save and put that prefab onto here. Unpack. We can now delete this one. Yeah. And we're gonna call it music master instead. And we're going to create an empty object called Music. And we'll add a component called Audio Source. And we'll choose our audio clip. Got one here called background music, BGN, choose that and output the sound to quite low to about. And that is okay. And make sure we have looping. In Music master. We don't need these, that one here, but we do want one of them. And we're going to say, for this one, music is on, Activate, music. Music is off. Delete this one. And where's his deactivate music that and that's all we need to do for that. But what we can also do is actually get our player making a sound. So if we go to our UI canvas, I'll touch control. We can add just two more states. Check sound. And we'll add on and off to here. So we've got two transitions, custom events on an MSN. Again, transitions, custom events off on will go to here. And we can actually don't need that one. We can duplicate this one. Control C, control V. And why it says fly up to is change it to no sound. And this one to sound. We're going to link from untapped go to here are one to go to there, off to go here. And that links to here. And I wanted to do on this one is play audio. Yet we don't have another SaaS. We'll click to add it. Now we're going to choose flap. Wafer kept away and we don't want to do that. And then in check sound just a bowl test. And say that to music. If it's true or not. If it's true, it goes to arm. If it's false, it goes to off. And we now we can just test it was hit play. We should hear music and when we tap our screen, the bird flapping. And now we go, so let's die. Okay, that was a bit slow, but it's okay. It'll be faster when you actually built the game. We're gonna kick retry, saves. That's turned it off, hit play. And if we hit now lock, no sound at all from our bird. So sound is now all set up. Perfect, and that is it. Their game is now finished. All that is left to do is add some advertising into it, and that will be our last one for the actual game activity. It's just all about uploading to the Google Play Store. 12. Lesson 11 Ads: Okay, welcome to lesson 10. This will be the last one for this unity costs activist. All you'll need to do is upload your actual game to the Google Play Store. And I'll tell you some of the patient how you can find out how to do that after this, at the end of this video. And also another place where you can upload it to. So Let's just get on with it. So first of all, we need to make sure that our game is going to be built for Android. So we're gonna go to build File, Build Settings, click on Android here, and switch platforms. If you don't have it installed, you click Install with Unity Hub. And it should open Unity Hub. And like basically install it for you. So I'll open it up like this. If not, we'll go to installs. And you'll go to here, add modules, and choose Android build support here, ticket. If you to do iOS, iOS, then you'd done it, will download it for you. When it's done. You can build for Android in here. So what I'm gonna do is I'm just going to switch to the platform. Switched platforms. And so take a few minutes so I'll cope. Okay, so now it's finished. You see now it says Build here. And as you close that, and it's gone too weird with a free aspect. So it's just put it back to 12, 18 times 720 or 10 a 1920 by 1080, perpetuate. Okay, and what we can do now, and I see supplement should save. We're going to add our add scripts to it. So go to here. And it should be in the future. There'll be a separate download for you guys. We just add VOS to it. Okay, So they are now here. And it's going to have an error saying there's no unity ads listener. That's really simple to fix. We're just gonna go to the Services tab. Now if you don't have the services tab is go to Window general services and they all open up this. And if you don't have an organization, you will need to create a new organization name. But I'm going to use this one here. And I'm going to click Create. And you'll get lots of options here. And the one we want is ADS. So we're going to click on ads and to give it a moment to load. So yeah, we want to monetize Games. If you're aiming for people under the age of 13, tick this here. I'm not going to be taking that because when I upload, again, I will say it's not aimed for children under the 13, So Google Play will flag it as not suitable for families. I stood to be safe. Click, Continue. And it's going to be important so that you see the moment I can't do anything is doing this. This is importing everything we need for unity ads. When it's done, you'll see this ever will disappear down here. Who's you only take a moment. Hey, it's just about done. The ADA will disappear. One is done. We want to make sure we tick the enabled test mode. All right, so that's done is enabled test mode. And make sure that this is done. And the error here is cleared out as appear. Now, first we want to go to dashboard. So click Go to dashboard. Now to do this, you're going to need to have and Microsoft FTE. I can never remember the name of it. Visual Studio. You're going to need Visual Studio. And you're gonna have to change a few things in this. And we're going to change up adding the IDs here, which will be on our dashboard. So it's loading up now monetization. If it says there's an option here that says enable ads, make sure to click Enable outs of y's go to add units. And we need to copy these. So first we'll start with the Androids who a copy to clipboard and paste this into here, where it says store ID, Unity, Android. And then the same for here for the iOS one. And pull that lab. Now, this is setup for iOS, iOS, Android devices. If you are going to be building for iOS, this will be in a color like it is here, and this one will be great. But you need to change these ones here. And that is really simple. If look here where it says like instinctual iOS, you just change here to be small. I began OS in all of these and then it will work. But because it's for Android, that is fine. I'm going to press Control and S to save. Nearly done now we can close this, go back to our project. Okay, give it a moment for the script to compile in here. Now it's done. We're going to create empty call this Ads Manager. We'll add the Ads Manager to the Ads Manager. And the tester. We're going to add to the game of a panel. And then on the retry button and we start button. Michigan back in inspector. We'll click on the plus here. So make sure it's on the restart button. Press the Plus, drag the Gamow of a panel into here. And then you'll notice it says test sta, choose test sta, standard ad. Now that should all be working. Let's just save, hit play. Let's just get a game over k. We can retry. And if you see this, this means your ads will work in the game. Perfect. Now, when you upload it or play on your phone, it may not show ads instantly. It could take a few hours to turn up or something is sometimes like some days maybe there's no adverts at all. It's all about what's available. So that is it for this course. Hopefully, you enjoyed it. And now you've got a fully working game. All you need to do is just build your game. I'm not going to include that in the course, but if you head over to my YouTube channel, there will be a link. I will have a rundown of how to build for Android, the App Store or Google Play Store. And as an APK file and other videos that what we will find helpful. Okay, So thank you very much for taking part in this course, and I hope you enjoyed it.