Setup For Mobile

3 minutes
Share the link to this page
Copied
  Completed

Transcript

Okay, so the last little pop thing to do before we get stuck into game development is we need to set up our project to work with the type of game that we want to make. So we want to make a mobile game. So it's pretty easy to do. So first thing we'll do is go to File, Save scene as, and we're just going to save the scene as main. Cool. So now we can see the scene has popped down here in the assets menu.

So if we click on Open the scene, Happy Days, everything's going well, do we want to go over to file, click Build Settings, and it should, should automatically be on the PC, Mac and Linux standalone. What we want to do is we want to click on the iOS or on Android depending on what you want to develop for personally, they're both pretty much exactly the same in regards to what we will be doing inside of unity. So choose which one and you want to click to, you want to click switch platforms. So mine's already on our way iOS, but click switch platforms and what that will do is it will move the Unity project over to work with iOS, it should take, you know, a couple minutes to do. The next thing we want to do after that's, that's kind of work. Go back into Build Settings, and we want to click Add open scene.

So you can see here, we have that deleted scene that we deleted at the start, we can just delete that. And we added our open scene, which is our main scene. So if we wanted to say build our game right now, we could actually build the game. And then we could actually move it over the Xcode or we can move it over to Android Studio, and we can put it on a phone and we would actually see this game that's totally like, you've already created a game. I mean, the game doesn't do anything, it just a camera in an empty space. So that's all you need to do to basically set up the project to work with mobile.

And I'm sure you found found it interesting that you can also do Xbox One, ps4, Facebook, I mean, unity is a really, really dynamic dimension and after you create the project, you Obviously, you have to do a little bit more tweaking in there in, for example Xcode or Android Studio to get it to get it to work. But basically, the majority of the work can be done in unity and export it to all these different platforms is really cool. So the next thing we want to do is we want to change our game aspect ratio. So this is like the camera like what the game will actually look like. And we could set it to like, you know, iPhone tall or you know, if you're on Android, we'll have some different options, iPhone, iPad wine, iPhone, for tall, and you know, has resolutions. But for ease of sake, I'm just going to create a new resolution, which is the exact resolution of my phone.

I currently have the iPhone seven plus, which has a resolution of 1080 by 1920. So if I go down here and press the plus button, I can create a new resolution. We're going to call this iPhone or Android or whatever you want to call it, and I'm going to make the With 10 ad, and the haunt 1920 and press OK. Awesome. So now, this is what our game will look like. When we press play.

That's what the camera looks like. And all of a sudden we've got the correct aspect ratio for a games working on a mobile platform is totally awesome. In the next episode, we'll do a bit of a scripting primer. For people who have never done coding before, just need a refresher. And we'll also explain how you know to use the scripts and how unity works to create an actual game inside of the game. So see you there.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.