-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- Switch Platform to "Android" then build the project to APK file.
- Install the APK to your Google VR device.
- Execute an onAirVR content program on your PC.
- Run the installed app on your Google VR device.
- Enter the IP address of your desktop and click Play button.
- Have fun!
- Add AirVRCamera component to the main VR camera.
- 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) {}
- Ensure that Internet Access in Project Settings is set to "Require".
- Build your project to APK file, then install it to your Google VR device.
- Execute an onAirVR content program on your PC.
- Run the installed app on your Google VR device.
- Have fun!