In the previous articles, we discussed that mobile app development industry has reached a new level. Virtual and augmented reality are on the rise, customers are obsessed with mobile animation, 3D models, visual effects and other "gaming" elements. Due to the growing scale and complexity of the challenges that app developers have to deal with, there is a strong need of new tools to help them fight against the titans, not just insects. This is the reason why the Unity 3D game engine deserves a special attention.
Why Unity? It all started when they added support for Microsoft HoloLens in Unity 5.5 and then included the maintenance of almost all VR platforms. In addition, Unity is perfectly tooled for creating cross platform applications, it takes just a few clicks to make a build for another platform. This resolves the problem that many customers have as they often want to release their apps both for iOS and Android.
Thanks to an extensive toolkit for making 2D objects, Unity works well for non-game app development too. I got an opportunity to talk about all the capabilities of this tool with Alexander Mikhalchenko, a developer who have been examining it for quite a while.
Why has Unity become so popular and in-demand lately?
I would not say that Unity has become popular just recently, it grew widespread a long time ago. When it became free, this increased its popularity even more. Before that it was necessary to have a paid account to build something in Unity and it costed about $30 per month. However, this couldn't last for too long. After one of the updates, Unity provided free access to almost all its Pro-features, except perhaps the extended support.
Why Unity developers are now in high demand also in companies that do not specialize in game development?
The point is that from the very beginning Unity game engine was designed for the multi platform development. It allows building applications for the desktop as well as for mobile devices. Why wasn't it used for this purpose initially? It's a question of power and performance of the devices themselves. Unity wasn't that popular before now because, due to its versatility, the engine is a bit heavy. Very few mobile devices were capable to run an application made with Unity, and even if they were able to do it, the optimization was far from being perfect.
Today's mobile phones are more than just phones. In fact, they are laptops with 8 gigabytes of RAM and a quad-core processors. The issue with performance faded into oblivion and the numerous advantages of Unity app development came to light. The main of them, as we already mentioned, is that it's a good tool to develop cross platform apps. In other words, we write the application just once, create builds for iOS, Android, Windows and launch it in all app stores right away. There is no need to develop a separate app version for each platform and to hire app developers for each version separately. It's enough to pick a Unity developer who can make the application for all platforms at once.
Do the apps made using Unity differ from the native ones?
As for Android apps, the differences are insignificant. Java has its virtual machine on Android and Unity has Unity Player. Actually, it's the same wrapper that allows running Unity applications on Android. With iOS, it's a little more difficult because of Objective-C and Swift. These languages are native, they are used to write apps for iOS. As a result, we can get an excellent performance - Apple has always been famous for the fact that all applications "fly" on their devices.
Does it mean that Unity apps work slower on iOS?
I guess that, compared to native iOS apps, they may lose in speed. However, with modern capacities of mobile devices, the difference is unlikely to be critical. Anyway, it's not a reason to avoid Unity. Multiplatformity is a great advantage of Unity development and you may sacrifice some performance for it.
Will it be cheaper to develop apps in Unity?
It depends on what type of app you want to develop and when. Unity is more popular in game development and it may be difficult to find a developer willing to use it for creating a simple mobile application like a notepad or a messenger. At least, for now. It's possible to find a specialist who knows Unity but it's much harder to find an expert in this technology. At this point Unity is better known as a tool for making games, we'll see what will happen in the future.
But is it possible to develop non-game projects in Unity?
Yes, Unity has everything needed for that.
What platforms are supported by Unity?
Well, I don't remember the exact number but it supports about 20 platforms, including XBox, Playstation, Windows, MacOS, iOS, Android, Blackberry and Symbian.
Is the current popularity of Unity somehow connected with VR?
Most likely. The libraries and tools that now exist in other languages are low level, self made (i.e., open source) but there are almost no good commercial libraries that can be used in production environments. There is Cardboard SDK from Google but when I checked it at the end of last year, there was a note that it's purely experimental and is not intended for production use. I am not much aware of these things in iOS but I know that there is the same Cardboard SDK and Apple has never welcomed open source libraries.
In Unity, there is a built-in support for virtual reality. Previously, there was a paid plugin on the asset store and now, after the recent updates, VR is supported by default. Simply tick the option "VR Project" and create two cameras - for left eye and right eye. It will be enough to press Play button and the engine itself will render a picture for both eyes. You can set the offset distance between cameras and other parameters. All this is done easily and quickly.
Does it work with augmented reality?
Yep. The global smash hit Pokemon GO was made in Unity.
Let's say we want to develop an organizer app. Will it be easier to create the app interface in Unity and work with images provided by designer or opt for the standard approach to front-end development?
Yes, there are two options: to build elements by geometry or UI. In Unity, there are all text input forms. I can't say how it can be flexibly configured out of the box. Most likely it will require the efforts to implement an unusual design idea. For example, we may need a custom shaped button. We can take a sprite (image), cut it and put it in the place where the graphic element of the button is usually located. A button in Unity consists of an image - by default, it's a white rectangle with rounded edges, menu and other stuff - i.e. it's a part of the button. We can throw away this part, replace it with any other image and it will still work as a button. In addition, Unity detects collision, model of the button, so its action area will be more accurate.
Besides, the 5th version of Unity introduced a new UI-tool for implementing interfaces. It looks like a grid with anchors and allows you to flexibly set up all control areas on the screen. When you change the screen size, these buttons move exactly as it has been originally specified by the programmer. Prior to that, you have to use geometry for such things and now it has become much easier.
Am I right thinking that Unity totally solves the problem with different resolutions of Android devices?
That's right. You can make an interface that will look good on any device, at any screen resolution.
What about optimization for different devices?
Certainly, optimization is needed and Unity has all necessary tools built-in. You can configure the settings of builder, which creates final application for a specific device, to compress textures, audio, video and other things. For the desktop, for example, you can turn all settings for maximum quality and for mobile devices - to minimum. As a result, your application will become lighter and faster.
And finally, in your opinion, what's the future of Unity?
I think it's bright. When the engine became free, thousands of developers rushed to build their own Crysis, 3rd Half Life and other "dream games." In other words, the Unity community is growing exponentially. A big community always creates a large number of products - complete games, apps as well as just assets for the asset store (there are people who focus exclusively on that!). More and more code is being written. Powerful mobile devices boost the interest of business owners and entrepreneurs for Unity as they can hire one Unity developer instead of two, one for iOS and one for Android. Sure, it will not work equally well for all projects as some of them require only native apps and then Unity is not the best choice. The Internet offers both paid and free courses - anyone can learn Unity and the learning curve is not high.
Thank you for an interesting discussion!
You're always welcome.
As you can see, with so many advantages, Unity simply have to be in your toolbox. Obviously, it's not a panacea for all problems that exist in the IT industry today but it can close the issue with cross platform development. This solution is particularly good for Android developers who don't have to suffer with numerous screen resolutions of various mobile manufacturers. Unity is able to facilitate the development of VR apps, implementation of an app interface and optimization for multiple platforms. What will happen next? We will see it in the next update and we hope that the creators of Unity will continue to successfully implement their progressive ideas.