-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Setup
The NetXr system consists of these main components:
Controls the Input devices and the prefabs of the Interfaces which needs to be setup according to the basic example. For a Vive or Oculus VR device you should activate "VR-Enabled" as well as "Vive Controller Enabled". To test using the mouse disable "VR-Enabled" and activate "Mouse Controller Enabled". The Gaze controller can be setup to activate using a timer.
The Event System must contain the default "Unity Event System". Also required is the InputModule.cs and InputDeviceManager.cs.
In the "Input Device Manager" you can setup the ray colors, materials and ray reticles. You can also add callbacks which fires when a new local input devices is created.
NetXr uses a overloaded version of the "Unity Network Manager" called the "Network Manager Module Manager" (stupid name). It has some additional callbacks for events of the Networking System.
Optionally the Network Manager (also badly named) can be added with the Network Manager Hud Script to have some Interface to create a Host or connect to a Server.
There should be a Main Camera added to the Scene with the MainCamera Tag on it. This Camera will be destroyed and replaced with the camera in the Prefabs under NetXr/Prefabs/CameraRigs/... at start.
A simple networked object that reacts to the NetXr Interaction System must have the "Network Interactable Object" script at the root. It also requires a NetworkIdentity.
If you want to create an object over the network, remember to add it to the "Network Manager Module Manager" under "Registered Spawnable Prefabs".