How to Make a Mobile Game in Unity (Android & iOS)

Make a mobile game in Unity 6: set up Android and iOS builds, add touch controls, fit every screen and safe area, test on a real phone and prepare for stores.

Home › Guides › How to Make a Mobile Game in Unity (Android & iOS)

Illustration: Make a Mobile Game in Unity

To make a mobile game in Unity, add Android or iOS build support in Unity Hub, design for touch and small screens, and test on a real phone early and often. Android builds work from any Windows, Mac or Linux computer, but iOS builds need a Mac with Xcode, Apple's free app-building tool. This guide covers setup, touch controls, screen sizes and safe areas, phone performance, device testing and what you need before you upload to Google Play or the App Store.

Time neededAn afternoon for your first phone build
CostFree to build, store fees to publish
You needA computer and an Android phone or iPhone
Skill levelBeginner who knows the editor

Design for phones first

A phone game is not a PC game on a small screen. People play in short bursts, often with one hand, on a bus or in a queue. Good mobile games respect that.

  • Short sessions. A round should take one to three minutes, and the game should save progress often.
  • Simple controls. Tap, swipe or one virtual stick. Every extra button makes the screen more crowded.
  • Pick one orientation. Portrait suits one-handed games. Landscape suits games with a stick and buttons.
  • Start in 2D. 2D games are easier to make, smaller to download and kinder to older phones.

If you haven't made a Unity game yet, build a small PC game first with how to make a game in Unity. Everything you learn there carries over. For the big picture on any engine, see how to make a mobile game.

Set up Android and iOS build support

Unity needs extra modules to build for phones. You add them in Unity Hub.

  1. Open Unity Hub > Installs. Find your Unity 6 version, click Manage and choose Add modules.
  2. For Android, tick Android Build Support together with OpenJDK and Android SDK & NDK Tools. These are the Android tools Unity needs. Use the versions Unity installs, not your own.
  3. For iOS, tick iOS Build Support. On a Windows PC, Unity can still write the Xcode project, but only a Mac can turn it into an app.
  4. Restart Unity, open File > Build Profiles and select Android or iOS in the Platforms list. If it's missing, the module isn't installed yet. Click Switch Platform and wait while Unity converts your assets.

Next, open Edit > Project Settings > Player and fill in these settings early:

  • Company Name and Product Name. They appear on the phone.
  • Package Name (Android) or Bundle Identifier (iOS), such as com.yourname.coinrush. Tick the Override Default box above it to type your own. This ID can never change once the game is in a store, so choose carefully.
  • Default Orientation under Resolution and Presentation. Pick Portrait or a Landscape option.
  • Scripting Backend: IL2CPP and Target Architectures: ARM64 on Android. IL2CPP turns your C# into fast native code, and ARM64 is the 64-bit chip type in modern phones. Google Play requires 64-bit apps, and ARM64 can only be ticked with IL2CPP.

The Android Player settings reference explains every other option.

How to add touch controls in Unity

New Unity 6 projects use the Input System, which treats a finger as a pointer, just like a mouse. That gives you two easy routes.

Route 1: a virtual stick and button, with no code changes. The Input System includes On-Screen Stick and On-Screen Button components. They pretend to be a gamepad, so the Move and Jump actions your scripts already read just work.

  1. Add a UI > Image in the bottom-left corner and add the On-Screen Stick component. Set its Control Path to Left Stick [Gamepad], which is <Gamepad>/leftStick.
  2. Add another UI > Image in the bottom-right corner and add On-Screen Button. Set its Control Path to <Gamepad>/buttonSouth, the button the Jump action listens to.
  3. Make both at least as big as a thumb. Players can't see under their fingers, so bigger is kinder.

Route 2: tap anywhere. For tap games, read the pointer directly. This script moves an object to wherever the player taps. In the editor, the mouse acts as the finger:

using UnityEngine;
using UnityEngine.InputSystem;

// Moves this object toward wherever the player taps.
public class TapToMove : MonoBehaviour
{
    [SerializeField] float speed = 8f;
    Vector3 target;

    void Start()
    {
        target = transform.position;
    }

    void Update()
    {
        // Pointer = the mouse in the editor, a finger on a phone.
        var pointer = Pointer.current;
        if (pointer != null && pointer.press.wasPressedThisFrame)
        {
            Vector2 screen = pointer.position.ReadValue();
            target = Camera.main.ScreenToWorldPoint(screen);
            target.z = 0f; // stay on the 2D plane
        }
        transform.position = Vector3.MoveTowards(
            transform.position, target, speed * Time.deltaTime);
    }
}

To preview touch without a phone, open the Device Simulator. Use the drop-down at the top left of the Game view to switch from Game to Simulator, then pick a phone model. Clicking the simulated screen creates touch input. It handles only one finger, though, and it says nothing about real speed.

Fit every screen: sizes, aspect ratios and safe areas

Phones come in many shapes. Some are tall and thin, tablets are almost square, and many have a notch or camera hole. Your game must look right on all of them.

  • Scale the UI. Select your Canvas and set Canvas Scaler > UI Scale Mode to Scale With Screen Size. Use a reference resolution of 1080 by 1920 for portrait, or 1920 by 1080 for landscape. Set Match to 0.5 as a start.
  • Anchor everything. In each element's Rect Transform, anchor it to the corner or edge it belongs to. A pause button anchored to the top-right corner stays there on every screen.
  • Leave room at the sides. The camera shows more or less of the world on wider or narrower screens. Keep important gameplay near the center.

The safe area is the part of the screen nothing covers: no notch, no rounded corners, no gesture bar. Unity reports it as Screen.safeArea. Newer Android versions show apps edge to edge, so the notch and gesture bar can cover the edges of your game.

The safe area on a phone screen A portrait phone with a notch at the top and a gesture bar at the bottom. A dashed rectangle inside the screen marks the safe area. The score and pause button sit at the top inside it. A virtual stick and a jump button sit in the lower corners inside it, where thumbs rest. Labels explain each part. Score 12 notch or camera hole pause button, top corner safe area (Screen.safeArea): keep all UI inside it thumb zone: stick and buttons go here, big gesture bar: no buttons score at the top
Keep every button and label inside the safe area, and put controls where thumbs naturally rest.

In Unity 6.6 and newer, Unity's standard UI system includes a ready-made Safe Area component. In Unity 6.3 LTS, use this small script instead. Put it on a full-screen panel under your Canvas, and place all your UI inside that panel:

using UnityEngine;

// Keeps this UI panel inside the phone's safe area.
public class SafeAreaFitter : MonoBehaviour
{
    RectTransform panel;
    Rect lastArea;

    void Awake()
    {
        panel = GetComponent<RectTransform>();
    }

    void Update()
    {
        Rect area = Screen.safeArea;
        if (area == lastArea) return; // nothing changed
        lastArea = area;

        // Turn pixel positions into 0 to 1 anchor values.
        Vector2 min = area.position;
        Vector2 max = area.position + area.size;
        min.x /= Screen.width;
        min.y /= Screen.height;
        max.x /= Screen.width;
        max.y /= Screen.height;

        panel.anchorMin = min;
        panel.anchorMax = max;
        panel.offsetMin = Vector2.zero;
        panel.offsetMax = Vector2.zero;
    }
}

Performance tips for phones

Phones are slower than PCs, they get hot, and players notice battery drain. Plan for an older, cheaper phone, not the newest one.

  • Set the frame rate. On Android and iOS, Unity runs at 30 frames per second by default to save battery. For smooth action games, add Application.targetFrameRate = 60; in a startup script.
  • Shrink textures. In each image's import settings, lower Max Size to what the screen actually needs, often 1024 or 2048. Huge textures waste memory and download size.
  • Pack sprites into an atlas. A Sprite Atlas (Assets > Create > 2D > Sprite Atlas) combines many images, so the phone draws them in fewer steps.
  • Reuse objects. Creating and destroying hundreds of bullets per minute causes stutters. Keep a small pool of objects, turn them off when done, and switch them on again when needed.
  • Avoid waste in Update. Don't call GetComponent or build long strings every frame. Do that work once in Start.
  • Measure, don't guess. Make a Development Build with Autoconnect Profiler ticked, then watch the Profiler (Window > Analysis > Profiler), a tool that shows what slows your game down, while you play on the phone.

Test on a real phone

The editor can't show how your game feels in your hands, how hot the phone gets or how the buttons sit under your thumbs. Test on a real device from week one.

Android, from any computer:

  1. On the phone, open Settings > About phone and tap Build number seven times. This unlocks Developer options. The exact menu names vary by brand.
  2. In Developer options, turn on USB debugging. Connect the phone with a USB cable and allow the computer when the phone asks.
  3. In File > Build Profiles, choose your phone under Run Device and click Build and Run. Unity builds an APK, the Android app file, installs it and starts it.

iPhone, with a Mac: click Build in the iOS profile to create an Xcode project. Open it in Xcode, choose your team under Signing & Capabilities, plug in the iPhone and click Run. The first time, the iPhone asks you to turn on Developer Mode in Settings > Privacy & Security. If the game then won't open, trust your developer account under Settings > General > VPN & Device Management. A free Apple Account lets you test on your own phone, but those builds stop working after about a week. Publishing needs the paid Apple Developer Program.

How a Unity game gets onto Android and iOS devices Two rows. Android: Unity with an Android build profile makes an APK for testing or an AAB for Google Play, you test it on your phone over USB with Build and Run, then upload to Google Play for a closed test and release. iOS: Unity with an iOS build profile writes an Xcode project, a Mac with Xcode signs and builds it with your Apple account, and it goes to your iPhone, TestFlight and the App Store. Android Unity Android build profile APK / AAB APK for testing, AAB for Play USB test Build and Run on your phone Play closed test, then release iOS Unity iOS build profile Xcode files Unity writes an Xcode project Mac + Xcode sign with your Apple account iPhone TestFlight, App Store
Android goes straight from Unity to the phone. iOS always passes through Xcode on a Mac.

Want to share an APK with friends outside Google Play? Android is adding developer verification. Since September 30, 2026, apps installed from participating app stores in Brazil, Indonesia, Singapore and Thailand must come from verified developers, and Google plans to expand the checks worldwide in 2027. Installing your own game over USB with Build and Run is not affected. For sharing with friends, Google offers a free limited distribution account that covers up to 20 devices.

What you need before uploading to the stores

Store accounts involve contracts, ID checks and money, so you need an adult. Google Play requires you to be at least 18. Apple requires the legal age of majority where you live. If you're younger, a parent or guardian can own the account and publish with you.

RequirementGoogle PlayApple App Store
Developer accountPlay Console, 25 US dollars once.Apple Developer Program, 99 US dollars a year.
ComputerAny Windows, Mac or Linux PC.A Mac that runs Xcode 26 or newer, which needs a recent macOS.
Upload formatAndroid App Bundle (AAB).An archive uploaded from Xcode.
TestingNew personal accounts: closed test with 12 testers for 14 days.TestFlight, Apple's beta testing app.
Rule to know nowTarget Android 16 (API level 36).Build with the iOS 26 SDK.

All of this is as of November 2026, and store rules change every year. Check Google's target API requirements and Apple's upcoming requirements before you submit.

  • Build an AAB. In the Android build profile, tick Build App Bundle (Google Play). Leave Target API Level on its automatic setting and use a current Unity 6 version.
  • Raise the version every time. Each upload needs a higher Bundle Version Code on Android or build number on iOS.
  • Prepare the paperwork. Both stores need a privacy policy link, an age rating questionnaire and a description of what data you collect. Ads and analytics count as data collection.
  • Make store art. Prepare an icon, screenshots in the sizes each store asks for, and a short description. Android uses adaptive icons, made of a foreground and a background layer.
Guard your signing key

Android builds are signed with a keystore, a file that proves updates come from you. Create it with the Keystore Manager in Player settings, back it up in two safe places and never share its password, not even with an AI chat. If you lose it, you can't upload updates to Google Play until Google resets your upload key, which takes time.

Plan at least three weeks for a first Google Play release, because the 14-day closed test comes before review. Our step-by-step guides cover each store: how to publish a game on Google Play and how to publish a game on the App Store. If you hope to earn money, start with how to make money from a mobile game. You can also browse Unity games and indie mobile games on Mutop100 to see what players vote for.

FAQ

Is Unity good for mobile games?

Yes. Unity is one of the most popular engines for mobile games, with mature Android and iOS support and many plugins for ads and purchases. It handles everything from simple 2D puzzles to 3D action games.

Can I make an iPhone game in Unity on Windows?

You can make the game on Windows, but you need a Mac with Xcode to build and sign the iPhone app. Unity on Windows can create the Xcode project. Many beginners start with Android and add iOS later.

How do I test my Unity game on my phone?

On Android, turn on USB debugging, connect the phone and click Build and Run in Build Profiles. On iPhone, build the Xcode project, open it on a Mac and run it from Xcode. The Device Simulator helps with layouts but can't replace a real phone.

How much does it cost to publish a Unity mobile game?

Unity Personal is free. As of November 2026, Google Play charges a one-time 25 US dollar fee and Apple charges 99 US dollars a year. Add the cost of a test phone and, for iOS, a Mac.

Why does my Unity game run at 30 fps on my phone?

Because Unity uses 30 frames per second by default on Android and iOS to save battery. Set Application.targetFrameRate to 60 in a startup script if your game needs smoother motion.

Should my mobile game be portrait or landscape?

Choose portrait for one-handed games like puzzles and runners, and landscape for games that need a stick and several buttons. Set it in Player settings under Default Orientation, and design for that shape from the start.

Launched your mobile game?

List it free in the Mutop100 indie games directory, with store links and player votes, and show up on the Unity and mobile pages.

List your game free
← Back to MU Online Guides