Now we need to make our game for, uh, mobile devices.
Uh, so what we're gonna do, we need to do something.
Firstly, we need to switch over to Android.
To do so, uh, move over to top left file, then click on this build profiles in the bottom and what
you need to do in the left part.
We, uh, we I, I was in a windows.
So basically select this Android and you're gonna see a button switch platform in the top right inside
in this uh, build profiles tab.
So just click on it.
And if you're not able to select this Android then you need to install it first.
Basically you need to add that module.
To do that you need to open up Unity Hub.
So basically open up Unity Hub.
And then in the left part you can see projects install and all of the things, all of the things.
So basically select this install and select the version that you were making your game inside that version.
Then click on the settings icon in the right side you can see or the cog icon and then click on this
add modules.
Click Add Modules and you're going to see Android.
So basically check that and then click on this install button in the bottom right.
You can notice.
So basically you need to select Android and make sure you select open JDK Android SDK and indicate tools
as well.
And after doing that basically selecting that.
Then click on this install button in the bottom right.
And after doing this you're gonna get that.
So basically then just move over to top left file, then build profiles and then select this Android
and then click on this switch platform.
And once you are done you're gonna see active button right next to this Android as you can see.
So I am already in this android as you can notice.
And now we need to do some settings, uh, in order to check our game live with our mobile phone to
do so.
To do that in the top you can see player settings.
So just click on that and then editor.
Basically choose editor in this Project Settings tab in the left bar you can notice.
So basically select this editor.
Then go over to device.
And as you can notice it says device and it says none.
So basically select this any Android device.
So make sure you just do that.
So select device and then choose this and any Android device.
And after doing that what you need to do you need to do some settings uh on your on your mobile phone.
But before we do basically make sure, uh, let me show you one more time.
So I'm going to cut this, all of these steps.
So basically move over to top left file then build profiles in the bottom.
And then you need to click on this player settings in the top.
And after doing that in the left part you can see editor right over here.
So select that and choose device to any Android device from none to any Android device.
And after doing that make sure you just cut this step.
Basically we have done the settings inside uh, in unity editor, and now we need to do some settings
on our mobile phone.
In order to check the game live in mobile devices while we're playing our game.
So you need to plug your mobile phone with an USB to your laptop or PC.
So you need to connect that.
So make sure you just do that.
And after doing we can just, uh, you can just move over to next lecture and I'm gonna show you something
over here.
So if we move over to Game View and then click on this game and then choose the simulator, we can notice
our game just gonna look like with any Android devices.
So as you can notice this is Apple iPod mini.
So in the top you can see simulator tab or this game tab.
So just click there and you're gonna see a button in the bottom cells say something like install additional
devices.
So just click on it and you're gonna see all of this.
So I'm going to choose let's suppose we're gonna choose Apple iPhone 13 Pro Max.
Let's this one as you can notice that the game just going to look like this in our Apple icon.
Apple uh, Apple iPhone 13 Pro Max.
And you can check with any other devices.
Let's suppose I'm gonna check with, uh, Google Pixel four.
As you can notice, the game just gonna look like this in our Google Pixel four.
And we can just switch to, uh, Samsung as well Samsung Galaxy.
So let's select this 5G phone.
So it's gonna look like this in our Samsung Galaxy.
So basically that is the thing.
And we can choose any other devices as well.
Let's suppose we're gonna choose Xiaomi Mi five as you can notice.
So the this buttons are just getting resized as the size of our screen or mobile screen size as you
can notice.
So if it's not happening then what you need to do you need to make sure.
So basically move over to hierarchy.
Then select this canvas.
Then go over to Inspector, score down to this canvas scaler and UI scale mode to choose this scale
with screen size and put in the X or width 1920 and in the height or in the Y put 1080.
So it's going to do that.
But if your game in portrait mode then you can just write this value.
And as you can see now, it's gonna fit all of these devices.
And we can check with uh, this one as well.
So basically we can see our game just gonna look like fine, fine.
And it's pretty much good.
Uh, to any Android devices, adjust this button.
Just get resizing.
And this icon just get resizing as the size of our screen size.
So I hope you get the idea.
And if you want to go back then click on this top left simulator tab.
Uh, so just click on this simulator and then click on this game to go back.
And that's it.
And now we need to do some settings in our mobile devices in order to check our game in our mobile devices.