Brain Station 23
Published in

Brain Station 23

Things to be aware of in Unity Non-Game App Development

When I first wrote the article regarding Unity App development I thought people would laugh at it. Well, some did. But apparently, a lot of people took it seriously as well. And honestly speaking in these last 2 years we At Brainstation-23 delivered quite a few Cross-Platform apps developed in unity. And the client is happy with it. A lot of people are becoming more and more interested in developing apps in unity as we are certainly moving towards animation heavy or 3D UI or visualizations. In case you wish to know more about comparisons you can read this article here.

But for his article would only focus on the potential concerns about Developing apps with unity instead of trying to sell why it’s a good idea. So that decision-makers can take a calculated risk. If you are reading this, You probably already know what’s good about unity App development. But let me share what could be the potential concerns about Unity App development & how to walk around it.

As it’s primarily a game engine. Unity never truly focused on the UI inputs. Because you know a game hardly needs those. But in an app that’s kind of mandatory. You need input fields like crazy. The way Unity By default handles UI input fields is a little weird. Since we are talking about apps I’m going to solely focus on Mobile (android/iOS).

  1. The Keyboard doesn’t automatically push the UI elements up. As a result, the keyboard is likely to hide your Input field. The way unity handles it is even worse. They create an additional input field on the top of the keyboard which looks really bad and most of the time it would be unacceptable. The good news is you can hide that and code in your own mechanics to push the elements up.
  2. If you switch from one input to another the keyboard will go down and pop up again instead of just staying there. As a result, if you have a registration form with lots of fields. The keyboard will keep popping up and down. Which is probably unacceptable as well.

Workaround

Develop your custom virtual keyboard for your app. This in turn will give you more control over the UI. But adds an extra development overhead. Well, the Good news for you my team is working on such an open source project. So hopefully you will get it for free should you need it.

Unity’s default UI doesn’t scale well out of the box. If you look closely you will find that the UI will have some issues around the edge. The reason it happens is unityUI expects Raster images. Now, this has multiple problems.

  1. The more Raster images you add to the project the app size will increase. As if the unity engine wasn’t heavy enough.
  2. Raster images don’t scale up or down properly. Images get blurred around the edges and it looks bad.

Workaround

Use vector-based UI or procedurally generated UI. In short, you can’t use the default Image component. You have to use a 3rd party solution. Don’t worry those are well supported. One such package would be this Opensource package called Shape2D. But there are other solutions to address the issues. You can find them in the Asset Store. But shape2D should be good enough for your needs. Using this would make the app size smaller as you would no longer need the images. Now you can draw shape-based UI which scales very well and very performant.

Map integration is where I hit my first blocker in a long time regarding Unity App development. If you look up Map services you will see Mapbox will come up first and they will proudly tell you that they support unity. Don’t be fooled by that. They do support it but it’s not even close to what you can do with their Web SDK. If you even take a close look you will see that it’s just a community-driven repository. It works to some extent. Well honestly speaking now it will come down to what you Accept as acceptable. In my case, the way the zoom worked in this SDK was totally unacceptable. Everything went black as you zoom in or out of the default demo. In their defense, I’d say they probably didn’t intend the Unity SDK to work that way, to begin with. For games, you would probably use the map data to load up your own 3D maps. In that case the features look pretty decent. But for App development, if you need map in your app. You probably should take a look if it’s acceptable or not.

Workaround

Develop your own Map SDK. Too expensive? Well, don’t worry there’s someone who already started working on it. You can check out this plugin called Online Maps v3. This plugin does a much better job at Rendering the maps on UnityUI. Even then it may not be up to the mark you are looking for. For instance, if you are focusing a Map Based application. You would surely need to develop the map generation from scratch and then the development would probably be map driven.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tanim-ul Haque Khan

Author — “How to Make A Game” / Apress, Springer Nature | Head Of Unity Department at Brain Station 23 Limited | Co-Founder of Capawcino Cat Cafe