Let's make a VR Game (Part 2)

Beginner's guide to develop a VR App using Unity (Build & Play)

Let's make a VR Game (Part 2)

In part 1, we have learned how to initiate and develop a VR project in Unite Game Engine. Now to run our project in Mobile or any VR Set, we have to build our project and generate an APK file.

To generate APK, you have to install UnitySetup-Android-Support with Unity. This option should have appeared when you install Unity in your PC. Android SDK should also be installed. Then,

  • Go to Edit from top Menu and Select Preferences… Select Preferences
  • Select External Tools from the popup window Select External Tools for SDK
  • Here you also have to select the path of where you have installed the Android SDK Browse and Select the SDK

Before Generating the APK, we have to Switch our platform to Android.

  • Go to File and Select Build Settings... Select Build Settings
  • From the Popup Menu, Select Android and then Click Switch Platform Select "Android" and Switch the platform

Now, to generate the APK, we have to change the APK Settings. So,

  • Go to Edit, Select Project Settings and then Select Player Going to Project Settings
  • Now at the right side panel you have to give your APK information.
  • From Right Panel, Select Other Settings
  • In Identification, change the Bundle Identifier with your own company and product name like “com.YourCompanyName.APK/ProductName” manner. Changing the "Bundle Identifier"

Now Generate the APK.

  • Go to File and Select Build Settings...
  • Select Android from Popup Menu and Select Build Select Android and Build
  • Choose the path/directory where you want to save the APK
  • Give your APK/File a name and Click Save Give file name, path and click "Save"
  • Wait and you will get your APK Your APK is Ready

Finally, Transfer/Copy the APK to your android device and install it. Then Run the Game and put the mobile in a VR Box/Google cardboard and enjoy. You have to use some external VR Controller to control the action (Walk, Run, Jump etc.) of the character.

This article is a simplest instruction to start your first VR Project. There are lots of assets, 3D Models, sounds and resources to make a 3D world and add various actions. I have created a First Person Survival Adventure game, where I added various characters, animals, trees, foods, weather and environments. For the backend logic of individual element's behaviour and actions, I have used C# programming language and various packages. Let keep that story for another blog. On the other hand, Apple is Launching Apple VR, we can also develop another app for iOS later.

Thanks for reading and kindly share your feedbacks or queries on the article.

Part 1 (Development): Let’s make a VR Game (Part 1)

GitHub Repository: github.com/muhaimenul/unity-vr-demo