Unity is a big name in the game development community, which makes sense, considering that the engine powers an estimated 45% of the total mobile game market. Of the hundreds of thousands of Unity games, roughly 17% are deployed on iOS, so there is definitely a big appetite for iPhone games on Unity.
If you associate iPhones with convenience and ease of use, you might think these characteristics also apply to development, but this is not the case. It’s anything but easy to make an iPhone game in Unity, but you can use this guide to get started, learn both about development peculiarities and alternatives such as Unity game development services.
Can You Make iOS Games with Unity?
If we were to describe Unity’s approach to supporting various platforms, it would be “something for everyone”. Since its first release in 2005, the game engine has undergone various improvements and expansions, culminating in a roster of a whopping 19 supported platforms, including mobile. In this regard, it is a clear winner in the Unity vs Cocos2D matchup, but is quite closely matched with Unreal Engine.
As we have mentioned, iOS games make up a significant portion of all Unity projects, so the engine’s makers have rolled out all the best infrastructure for developers. Support for iPhones was first added in 2008, and currently includes various helpful scripting APIs, deep-rooted integration of XCode (the default IDE for iOS development, and of course, a full range of instruments used for other platforms and compatible with this one.
What do I Need to Create an iOS Game with Unity?
Starting a project using a new set of programs or targeting a new platform can be a bit overwhelming, and it leaves many specialists scratching their heads about where to start. We suggest starting with a plan: evaluate and gather the things you need first, and then start the active phase of development.
Technical requirements
In terms of hardware, you will most certainly need to provide everyone involved in coding and design with a high-performance computer, so they will be able to check and review the game in all states and loads. 3D modelers may also need graphical tablets for creating 2D and 3D assets. For testing purposes, it is recommended to have at least a few iPhones of different models (and possibly iOS versions). Finally, you may also need a dedicated server if your game will have networking functions.
In terms of software, you’ll probably end up using some (if not all) of the following programs:
- Unity
- XCode (IDE)
- Blender
- Maya
- 3DS Max
- iOS SDK (if you’re developing on a Mac)
Cost and time
Generally speaking, most fully-fledged games released to the public take months to develop, or stretch into years depending on the scope and how serious you are about the project. Similarly, the costs can vary greatly based on several factors, most crucially time invested by specialists and the number of people involved in the project. The bulk of the costs will go into paying the specialists’ salaries, but you will also have costs like software licensing, server renting, and hardware maintenance.
As such, the cost involved in most commercial game projects starts at $50,000 and goes up to millions, depending on the factors we listed and many more that cannot be predicted. It is not uncommon for RPGs, hyper-casual games, and AAA titles to have budgets of $2 million or more. Certainly, these costs are nothing to scoff at, but the possible financial rewards if your game becomes popular can quickly cover your costs multiple times over.
How does iPhone game development compare with Android development?
From a business standpoint, many companies that choose to develop for iPhone do this because their game is marketed towards audiences in North America. This is where the greatest number of paying iPhone users reside, and where a substantial part of your profit will come from. However, we do not recommend ruling out Android as an additional platform, given that Unity also has great infrastructure for it and many great Android games with Unity have been made.
From a technical standpoint, there are several notable differences in development between the 2 OS:
- iPhone screen sizes are much more uniform and easier to scale than Android gadgets, which are produced by hundreds of companies with very different proportions
- iPhone alerts and privacy settings are much more streamlined than their Android counterparts
- Android apps are built with functionality built into the “back” button (and 2 others), whereas iPhone apps only have the “home button”
- iOS makes it much easier to achieve high-quality aesthetics due to robust animation design features built in.
How do I Get Started with Development?
After you hire Unity developers or gather a team from existing staff, lay out a plan, and finish most of the art/design work for your app, you can get started with the most interesting and difficult phase of production – development. Please keep in mind, it could take weeks and hundreds of pages to fully cover how to make a game with Unity, so we will just be going over some key aspects of it:
Key steps of game development with Unity
1. Setting up accounts
At the very least, you will need to sign up for accounts with Unity and Apple Developers. Unity has a free plan for small projects under $100,000 as well as more advanced options like Plus, Pro, and Enterprise. If you are not handling the project solo, Enterprise will probably be your best bet, and it carries a cost of $2,000 per month for 10 seats.
As for Apple Developer, it is absolutely crucial to create this account if you plan to host your game on the App Store. You will need an Apple ID and a D-U-N-S number for your company, which can be obtained during signup. There is a universal $99 enrollment fee per year, though some entities may be eligible for a waiver.
2. Utilizing device functions
To create the core functionality of your game with Unity, you will be working closely with the Handheld and Input classes, among others. These scripts will determine how users interact with your app, and how the app responds (e.g. toggling vibration, activating/disabling activity indicators, going into full-screen mode).
Your scripting environment will mostly consist of your IDE (XCode), as well as external debuggers and code analyzers. They will help you set breakpoints and maintain a high quality of code. For your scripting backend, you can choose between options Mono or IL2CPP, though only IL2CPP will allow you to compile code ahead of time (AOT).
3. Coding and exposing code
Because Unity runs on C# and iPhone apps run on Objective-C or Swift, you will need to call native functions in these languages with special C# scripts. The binding process can be handled with the help of plugins. Creating native plugins will require 2 interconnected libraries – one with the native script and one with Unity’s C#. The interactions, rules, and functional conditions of plugins can be set with the help of Unity’s Plugin Inspector.
4. Working with assets
In order to work with assets in Unity and add them to your game logic, it is first necessary to import them. These assets come in many different types, including image files, 3D models, textures and meshes, and audio files. You can even import them in groups and collections with the help of Asset packages and AssetBundles.
The import process is usually relatively straightforward. First, the engine assigns an asset ID for the object(s). Then it creates a .meta file and processes the object. More complex and sizable assets may need to be imported with special parameters in the Inspector menu. Some assets (such as meshes, animations, and audio tracks) can be created directly in Unity.
5. Implementing monetization
To make your game profitable, you have several monetization options available – initial purchase, in-game ads, and in-game purchases. You can’t set the app price in the Unity game engine iPhone settings, but you can do this in the App Store listing.
The other 2 are a bit trickier. To implement in-game ads, you will need to download the Unity Ads SDK and work with it, while in-app purchases can only be added through integration with Apple’s StoreKit API. In addition, NFTs can be considered as one more way of monetization throughout in-games purchases. Setting up such monetization is better to be done with an NFT game development company with relevant expertise.
Looking for professionals to cover all of these steps?
Tips and considerations for the iOS development with Unity
As you advance through the development process, you are bound to come across surprises both good and bad, as well as changing circumstances which can substantially alter the course of development. Hopefully, the following points will help you make informed choices:
- Consider cross-platform development
Unity makes it easy to develop cross-platform, so you can easily develop with 2 or three platforms (like Android and PC) in mind. Naturally, there will be differences between the cross-platform versions, and you can tailor code for an individual platform with the help of Unity’s Platform Dependent Compilation feature. - You may want to develop for iPad too
Though iPad is a product owned by far fewer users than iPhone (2.2 billion to 425 million), it will not be too difficult to also make your app available to these iOS users. You can create an app version specifically for iPad or just rely on Apple’s convenient scaling feature to adjust the iPhone app to iPad screens. - Get used to plugins
Though Unity has a lot to offer, it probably won’t cover all your iPhone-specific needs. Thus, you should get used to the idea that you will be writing plenty of code and scripts outside the engine and binding it through Unity plugins. - Use the latest stable Unity release, not the newest
Before you download Unity, be sure to check the version. Traditionally, many Unity builds are released with plenty of bugs and issues, so if the current version carries many new features and upgrades, it is recommended to wait until most of the issues are ironed out in a new build or just download the previous stable build. - Don’t be intimidated by large file sizes
Many developers are shocked when they see the final size of their app bundle for iPhone – it is often several times larger than an analogous one for Android would be. As long as your game is well-optimized, the difference in sizes can just be attributed to 2 separate kinds of compression. Android used ETC compression which is a bit more frugal, while iOS uses PVRTC compression.
Don’t Forget to Test Your Unity Game on iPhone!
Game testing is a crucial stage of production, and skipping it usually leads to the release of a broken game panned by critics and users alike. We recommend conducting testing in all phases of development, so feedback can be collected and changes made before the game’s core functionality and features are locked in.
You have multiple options available for testing. First and foremost, the Unity Test Framework – a helpful and robust tool that can be downloaded in the Unity Package Manager. The UTF is built on an open-source unit testing library and carries the very efficient Test Runner API. With these tools at your disposal, you can easily split/run your builds and automate testing.
As an alternative, you can use XCode’s testing simulator, which offers fairly simple yet effective functionality. To simulate the game on an iPhone, you can deploy the alpha build and test it on a real device or simulate the device with a feature like Unity Remote.
Hexagonium Case Study – iPhone Game Developed by Game-Ace
To give you a more grounded and realistic view of development, we can use the Hexagonium game as an example. This is an MMORPG developed with Unity and released for Android, iOS, and PC. The game featured 3D graphics, numerous game levels and worlds, as well as networking features like player coop and 1v1. As you might imagine, this took many months and substantial resources invested.
Through in-depth optimization and testing, we were able to release the game with a high level of quality and bring joy to thousands of users. We struggled with juggling performance on newer and older devices, scaling on devices of various sizes, but our QA and developers pulled through and delivered the level of quality that our customer expected.
Find the Right Unity Developers for Your iPhone Game
As we have shown, it takes a lot of resources to make a game, even for a small device like the iPhone. You need a large team with the right expertise, plenty of time, and dedication to the process. If you are lacking in any of these things, you don’t necessarily need to spend months learning or hiring – you can just partner with a game development studio.
Game-Ace is one of several prominent studios offering mobile game development services and cross-platform services. With several decades of game design and coding under our belt + one of the largest certified Unity teams in Europe, we have everything you need to push your project to success.
Want to learn more or kick off development with Game-Ace? Just contact us.