Skip to content

Getting Started

kteem edited this page Apr 15, 2018 · 1 revision

There are two ways to get started using onAirVR Client : building the official onAirVR app, or your own client app.


Build the official onAirVR app

  1. Switch Platform to "Android" then build the project to APK file.

Figure 1.

  1. Install the APK to your Google VR device.
  2. Execute an onAirVR content program on your PC.
  3. Run the installed app on your Google VR device.
  4. Enter the IP address of your desktop and click Play button.

Figure 2.

  1. Have fun!

Build your own client app

  1. Add AirVRCamera component to the main VR camera.

Figure 3.

  1. Write scripts to connect to your PC on which an onAirVR content program is running.
void Awake() {
    AirVRClient.Delegate = this;
}

void Start() {
    string address = "192.168.0.0"; // IP Address of your PC
    int port = 9090; // Port of onAirVR content program (9090 by default)
    
    AirVRClient.Connect(address, port);
}

// implements AirVRClient.EventHandler
public void AirVRClientConnected() {
    AirVRClient.Play();
}

public void AirVRClientFailed(string reason) {}
public void AirVRClientPlaybackStarted() {}
public void AirVRClientPlaybackStopped() {}
public void AirVRClientDisconnected() {}
public void AirVRClientUserDataReceived(byte[] userData) {}
  1. Ensure that Internet Access in Project Settings is set to "Require".
  2. Build your project to APK file, then install it to your Google VR device.

Figure 1.

  1. Execute an onAirVR content program on your PC.
  2. Run the installed app on your Google VR device.
  3. Have fun!
Clone this wiki locally