Let's make a VR Game (Part 2)
Beginner's guide to develop a VR App using Unity (Build & Play)
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 External Tools from the popup window
- Here you also have to select the path of where you have installed the Android SDK
Before Generating the APK, we have to Switch our platform to Android.
- Go to File and Select Build Settings...
- From the Popup Menu, Select Android and then Click Switch Platform
Now, to generate the APK, we have to change the APK Settings. So,
- Go to Edit, Select Project Settings and then Select Player
- 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.
Now Generate the APK.
- Go to File and Select Build Settings...
- Select Android from Popup Menu and Select Build
- Choose the path/directory where you want to save the APK
- Give your APK/File a name and Click Save
- Wait and you will get your APK
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