Hello, guys.
So this is the interesting part.
We're going to make a build for mobile phone.
First of all, I want to talk about iOS because there is not really much to talk about.
If you make a build, it's going to look same as an on Android, basically the same.
The only difference is you cannot make a build for iOS if you don't have a MacBook.
And that is the problem here.
Because I don't have a MacBook, I cannot show you how to make it on a MacBook.
But luckily for us there is a solution.
You can go to YouTube and simply type Unity, Mac, build iOS or something like that.
There are bunch of videos that explains pretty well what you need to do, and I watch some of them.
As you can see, Timeline is here.
I watch some of them, they explain it pretty well and it's really not difficult task.
So just you can see even 10 minutes will be enough for you to understand how to do that.
Just I don't have a MacBook, so I cannot really do anything.
I'm sorry about that.
I hope you'll forgive me.
Let's move on.
Let's make a build for Android.
Oh yeah.
And there are a couple of solutions that comes to my mind.
First, like you can ask your friend for MacBook or anything.
Just in my environment, there is no one with the MacBook, honestly.
Yeah.
So let's click Android and what do you need to do here is to do switch platform and.
That was pretty fast for me because I did it before.
But for you, it might take some time.
The next step would be is to go player settings.
We're going to talk a bit more about these settings when we're going to publish Game on the Play Market.
One of the most important here we need to think about is in the resolution and presentation.
And I'm talking about.
Outer rotation here.
So orientation is how you need to hold your phone to play the game.
Our game is horizontal, but you cannot just choose landscape right or landscape left because it will
lock your phone on one landscape and you cannot turn phone around.
But what you can do is to click out of rotation and then choose allowed.
Orientations in our case is going to be both of them left and right.
There is also aspect ratio mode.
You can change it to custom and set 16 to 9.
For example, make sure you disable resolution scaling mode, otherwise it will bring geographic quality
to the worse, worse, worse quality.
Yeah.
And talking about quality, let's go over here to quality and make sure we change default quality for
Android from medium or low.
What it was for you.
You can make high, very high.
Ultra high will be enough.
Pretty much enough for our task here.
Yeah.
Let's go back to player settings here.
There are some other settings that we're going to talk about later when we make in a build, I promise
you.
So don't worry about them now.
Now we just need to do some testing.
And I want to tell you how you can test a game on your phone.
First of all, most simple option is to click build.
You need to find a place for it, and you'll create an APK file.
You can see I have mine.
Let me rename this.
I'll delete this one and I'll rename this one to something like Parkour Runner.
It will take some time.
And once you have a build, you can transfer this file to your phone with a wire and play the game.
And play the game.
But what if we need to check this and that all the time for your phone?
There are some changes you want to do and you want to double check.
It's really annoying to transfer your game through the cable all the time.
So there are a couple of options.
First, what you need to do is to go to play market.
Google Play Market.
And you need to find application that is called Unity Remote five.
This is the one you need to install this application.
You can see I have it on my device already.
And after that you need to switch on debug mode on your phone.
Obviously there are so many phones in the world I cannot show you instructions for every phone, but
all we need to do is to again, go to Google, type the model of your phone.
Mine is Samsung SE 21, for example.
Debug mode.
And there are some instructions how you can do it.
Pretty simple stuff.
I will show you how I did it on my phone.
You just needed to go to settings, find the amount, the phone click multiple times on a certain place
in the list and developer option was switched on.
Then I just needed to switch on debug mode.
Pretty simple.
Once you have that, you can go back to unity.
You connect via to your phone and to your laptop.
You connect them together.
And well, let me do it by the second.
Or is my phone.
Found it.
I want to record this so you can see it.
Give me a second.
I'll place a video on the screen.
So you can see my unity remote is on and after that I can do refresh, find my device over here.
Or you can choose default device.
It's fine.
It's going to work.
Then I'm going to click, build and run.
I still need to save an APK file, but I don't need to transfer it every time, which is much better.
Right?
So we can see it's a bit blurry.
We're going to fix that with the frame rate settings.
It's fine.
Don't worry about that.
And buttons are working.
That is good.
Good enough.
And we need to fix this UI.
We're also going to take care of that later.
I'm going to show you how to set UI for different devices.
But in general, everything is good.
I like it.
Okay, Now let me show you another way to debug your game, which is pretty useful as well.
You can do it without making a build every time.
What you need to do is go to edit project settings.
You need to find editor and here under devices you can choose any Android device.
After that you can close the settings and whenever you hit the play mode and whenever you hit play mode
with your phone connected and with Switched on Unity remote then.
You can see game is playing on my phone as well, which is pretty convenient, right?
So I can do some slight changes and then try again.
Exit play mode.
And their play mode.
Pretty good.
I can see my game at four screens right now.
All right.