(1) GearVR Development and Application Introduction Tutorial: Development Environment Construction

Build the GearVR development environment (Windows OS)

 
The blogger's development environment is 
Operating system Win10;
Unity 5.6.2f;
Java Development Kit8(JDK);
Android SDK 和 SDK Tools;
When Unity builds Android apk, it needs to select Android SDK and JDK. These two must be prepared before development.
1. Hardware and software preparation
2. The process of building the development environment
1. Hardware and software preparation
1. Hardware
There are three options below, GaerVR and mobile:
  • Gear VR Innovator Edition for Note 4 and Samsung GALAXY Note 4 mobile phone
  • Gear VR Innovator Edition for S6 and Samsung GALAXY S6 or S6Edge mobile phone
  • Samsung Gear VR with controller version and Samsung GALAXY S7 or S7Edge phone
This version of GearVR with a controller supports two interfaces, USB Type-C and Micro USB, and is compatible with many Samsung mobile phones (the blogger used this one for testing in this article, and the official compatible devices are shown in the figure)


2. Software
  • oculus.unitypackage 1.32
  • Unity 5.6.2f
  • Java SE Development Kit 8(JDK)
  • Android SDK 和 SDK Tools
2. The process of building the development environment
1》Unity 5.6.2f installation
Log in to the Unity official website to download Unity  https://unity3d.com/cn/get-unity/download , choose to download according to the system 32-bit and 64-bit, after the download is complete, open the UnitySetUp.exe installation package and install it on the computer according to the prompts. Once Unity is activated, projects can be created.
2》oculus.unitypackage 1.32
Open the Unity menu bar and search for Oculus in Windows-Assets Stor, and download the OculusUnity collection package (as shown in the figure)




 After importing to Unity, there are folders Oculus and Plugins in the Project panel (as shown in the figure). Under Plugins is the configuration file required by Oculus when publishing the platform. There is a Demo project under Oculus-VR-Scenes, which can be run to see the effect.

3》Java SE Development Kit 8
a. Enter https://www.oracle.com/technetwork/java/javase/downloads/index.html , select jdk and click downloads, select Windows x86 or Windows x64 file
There may be the latest version of the Java SDK when downloading here, and you can choose to download the latest version. The version used by the blogger for the test here is 8u192.
b. Open the exe file to install jdk. Pay attention to the installation directory before installation, which will be used later when configuring environment variables.
c. Follow the prompts to complete the installation.
d. Open the command prompt window, enter the following command and press Enter:
Java -version
The current Java version number will be displayed in the window:

e.jdk has been installed, if it is not displayed, then configure the environment variables.
Open the control panel and find advanced system settings

Click Advanced System Settings to pop up the System Properties interface, select Advanced in the menu bar and click Environment Variables below

Open the environment variable interface, select the first user variable, click Paht, and then click Edit

Open the edit environment variable interface, click New, fill in your jdk installation directory in the left box and click OK.

At this point, the environment variables are configured, and the Java version number can be seen when running the command.

4》Download and install Android SDK
a. Enter:  https://www.androiddevtools.cn/
Select Android SDK Tools in the navigation bar - SDK Tools Select the SDK you want to download according to the platform, there are two Installer_r24.4.1-windows.exe and android-sdk_r24.4.1-windows.zip.
After the zip download is complete, decompress it to a local directory, and Unity will let you choose this directory during Build. 
b. Download the exe, run the installation package, and install it.
c. After the installation is complete, in the Android SDK Tools Setup window, tick Start SDK Manager, and then click Finish. This will open the Android SDK Manager.
d. Select the following kits:
·Android Platform-tools (latest version)
·Android SDK Build-tools (latest version)
·Android *.*.* (API *1)
Note: Some toolkits may have been selected when running the Android SDKManager. This tutorial requires only the three toolkits mentioned above to be installed. If a toolkit other than this is preselected, it can be deselected before installation.
e. Click Install.
f. In the Choose Packages to Install dialog box, select License on the left and Accept License, and then click the Install button.
5》Configure mobile device
This step is mainly to turn on the USB debugging function of the mobile phone.
A. Connect Samsung mobile phone and computer with USB cable.
B. On the phone, go to Apps>Settings.
C. In the Settings app, scroll down to the SYSTEM section. If you see the Developer options [Developer Options] menu, you can skip to step 6. Otherwise, proceed to step four.
D. Select the About phone menu.
E. Pull down to Build number [serial number], and click 7 times. This will activate the DeveloperOptions on the phone. Return to the Settings page.
F. Select the Developer options menu item
G. Find the DEBUGGING section in Developer options and allow USB debugging. Select OK in Allow USB debugging?.
H. In the next dialog box, check Always allow this computer, and select OK.
I. Open the command prompt window and enter the following command to enter the /platform-tools directory of your AndroidSDK:
CD[pathToAndroidSDK]/platform-tools
J. Enter the following command, you will see that the mobile device has been connected to the computer.
adb devices

The above command can also see the device ID, which has been provided for Oculus signature.
6》Download the Oculus signature file
A. Go to the https://developer.oculus.com/osig/ page and log in to your Oculus account. If you don't have an account yet, you can register for one.
B. After the account is logged in, paste the device ID into the input box of the form, and click the DOWNLOADFILE button. Download your signature file and keep it somewhere handy.

Guess you like

Origin blog.csdn.net/u013774978/article/details/130001705