09-24-2019 01:19 PM
Hi All,
I'm one failure away from launching my first OG/GearVR VR app and have got myself completely stumped 😞
********************
Overview
If the app cannot be used
without an external input device (e.g. gamepad or 3DOF controller), and no
input device is detected when the app starts up, the app must warn the user to
connect the necessary device.
Result
The application does not warn
Gear VR users that an external input device is required when one is not
connected.
// returns true if right-handed controller connected
OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote);
09-27-2019 02:07 PM
09-28-2019 01:32 AM
09-28-2019 01:41 PM
public class CheckForRemote : MonoBehaviour
{
public GameObject noRemoteMessage;
// Start is called before the first frame update
void Start()
{
noRemoteMessage.SetActive(false);
}
// Update is called once per frame
void Update()
{
if (OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote))
{
noRemoteMessage.SetActive(false);
Destroy(gameObject); //Found Controller so can destroy this object to stop constant checking
}
else
{
noRemoteMessage.SetActive(true);
}
}
}
09-28-2019 08:21 PM
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CheckForRemote : MonoBehaviour
{
public GameObject noRemoteMessage;
// Start is called before the first frame update
void Start()
{
noRemoteMessage.SetActive(false);
}
// Update is called once per frame
void Update()
{
if (OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote))
{
noRemoteMessage.SetActive(false);
Destroy(gameObject); //Found Controller so can destroy this object to stop constant checking
}
else
{
noRemoteMessage.SetActive(true);
}
}
}
09-29-2019 12:19 AM
09-29-2019 01:00 PM