protected virtual void Start() { createCookie(Shader.Find("onAirVR/Unlit alpha blended")); recalculatePointerRoot(); AirVRClient.MessageReceived += onAirVRMessageReceived; AirVRInputManager.RegisterTrackedDeviceFeedback(this); }
protected override void Start() { base.Start(); AirVRInputManager.RegisterInputDevice(new AirVRTouchpadInputDevice()); AirVRInputManager.RegisterInputDevice(new AirVRGamepadInputDevice()); AirVRInputManager.RegisterInputDevice(new AirVRTrackedControllerInputDevice()); gameObject.AddComponent <AirVRGazePointer>(); gameObject.AddComponent <AirVRTrackedControllerPointer>().Configure(defaultTrackedControllerModel, true); }
protected override void Start() { base.Start(); foreach (var inputDevice in _inputDevices) { AirVRInputManager.RegisterInputDevice(inputDevice); } gameObject.AddComponent <AirVRTrackedControllerPointer>().Configure(defaultTrackedControllerModel, true, _armModel); }
void Awake() { Assert.IsNull(_instance); _instance = this; DontDestroyOnLoad(gameObject); _inputStream = new AirVRClientInputStream(); _inputDevices = new List <AirVRInputDevice>(); AirVRClient.MessageReceived += onAirVRMessageReceived; }
protected virtual void Start() { defaultTrackedControllerModel = Resources.Load <GameObject>("trackedControllerModel"); _renderCommand = RenderCommand.Create(profile, _camera); AirVRClient.LoadOnce(profile, this); AirVRInputManager.LoadOnce(); AirVRClient.MessageReceived += onAirVRMesageReceived; AirVRInputManager.RegisterInputDevice(_headTracker); StartCoroutine(CallEndOfFrame()); saveCameraClipPlanes(); // workaround for the very first disconnected event }
public void Update() { if (Application.isEditor) { return; } if (AirVRInputManager.CheckIfInputDeviceEnabled(this) != connected) { if (connected) { AirVRInputManager.EnableInputDevice(this); } else { AirVRInputManager.DisableInputDevice(this); } } }
void OnDestroy() { AirVRClient.MessageReceived -= onAirVRMessageReceived; AirVRInputManager.UnregisterTrackedDeviceFeedback(this); }