Example #1
0
    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);
    }
Example #3
0
    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;
    }
Example #5
0
    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
    }
Example #6
0
    public void Update()
    {
        if (Application.isEditor)
        {
            return;
        }

        if (AirVRInputManager.CheckIfInputDeviceEnabled(this) != connected)
        {
            if (connected)
            {
                AirVRInputManager.EnableInputDevice(this);
            }
            else
            {
                AirVRInputManager.DisableInputDevice(this);
            }
        }
    }
Example #7
0
 void OnDestroy()
 {
     AirVRClient.MessageReceived -= onAirVRMessageReceived;
     AirVRInputManager.UnregisterTrackedDeviceFeedback(this);
 }