top of page

Working with Unity and Vuforia (Review)

Recently I was tasked with developing a Augmented Reality Business Card app. I had never done anything like this before, I had to do a little bit of research to figure out where to even begin designing this project. After a little searching, I decided that my best course of action was to develop the app using Unity and Vuforia as I could make the app for both Android and IOS devices.


Setting up a Unity project and setting up the project to use Vuforia was very simple. When installing Unity, I had to check the “Install Vuforia Support” option in the installation menu. Unity has a built-in asset store and to set up Vuforia; in the project I simply had to look it up in the asset store and import it. After importing, I had to go to the Unity Player setting and click the box to enable Vuforia AR.


Setting up image targets was a bit more complicated, requiring going to Vuforia’s website to set up a license and database and adding the target image to the database by uploading the it and specifying the width. After this is done, going back into Unity and going into the setting, a license key needs to be added, the database imported, and the target image asset imported. Next, I had to set the Image target in the Unity project to the desired picture I uploaded to the database.


Programing the rest of the components took a while but was not too complicated. Programing buttons was fun, it required importing images and making textures out of them, applying the textures to cubes, and then scripting. The scripting was very simple and didn’t require extensive research to figure out how to do what I was trying to do. The buttons I programmed when clicked were set to open webpages, and writing functions for opening webpages was extremely simple, just one line of code. Unity also contains example resources which can come in handy, like when I had to add a video to the app, I imported a video player resource, and then customized for my own app, changing the video, and removing the timeline.


Although Unity has a somewhat confusing user interface, after using it for a short amount of time it becomes much less confusing and just simpler and older looking. Most of the programing done in Unity is done by dragging and dropping assets, resizing, and editing properties in the inspector menu. Positioning and resizing works smoothly. Adding animations to the applications elements is tedious but not complicated. There is an animation window that you can add basic animations to. Programming a custom animation such as an infinitely rotating object, requires scripting.


When the app was completed to a satisfactory level, it was time to build the project. I was asked to build the app for both Android and IOS devices. Building and distributing the app for android was simple. Unity simply built an APK and all I had to do was put it somewhere where people could download that file and install it on their phones. I did not need to pay extra fees for a distribution license if I did not want to, and the app could easily be downloaded and installed on other people’s devices without needing to be on the google play store.


Deploying on IOS was a very different story. Luckily, I have an old mac, without it deployment for this platform would be impossible as the application XCode s needed to build the file that Unity produces when the IOS platform is selected for the build. XCode is a software that is used for building IOS applications that is only available on MacOS. I was running an older version of IOS, so I had to download an older version of XCode as the newest version was not compatible with my current OS. After installing the old version and correcting the app for IOS I built the XCode file and attempted to build the app, but this process failed. After researching extensively to solve the issues I had encountered, upon solving them I was only met with more issues[JO5] . Finally, everything seemed to be set up to work, I plugged in an iPhone (physical connection needed to install the app on a phone without a $99 developer license), and after clicking build I was presented with an error “no disk image”. After some more research it was concluded that the version of XCode I could use on my current OS was too old and could not built for current IOS platforms. So, I had to install a completely new version of MacOS, install the newest XCode, reinstall Unity, reimport my project, and finally build the project again. After all that work, I was able to deploy the app onto one phone.


If you are programing an augmented reality app for Android, using Unity with Vuforia is a great way to create your app as deploying it is very user friendly, customizable and quick. If you do not want to deploy your app the Google Play Store, distributing your app for free is possible, just takes a little work. If you are trying to distribute your app for IOS, although creating the app is still the same process as for development, deployment is a complicated and time-consuming task so be prepared to put in some extra work to get your app deployed if you do not want to purchase Apple’s developer license.


Pathways is experimenting with different ways to use AR in our office and here is an example of a recent application we created.



Comments


Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page