Skip to content

Instantly share code, notes, and snippets.

@julhe
Created April 6, 2020 16:51
Show Gist options
  • Save julhe/f5851129b7d542e6eebceaf2cdd7fcde to your computer and use it in GitHub Desktop.
Save julhe/f5851129b7d542e6eebceaf2cdd7fcde to your computer and use it in GitHub Desktop.
LogXRStatus
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class LogXRStatus : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.LogError($"INFO: XRSettings.enabled = {XRSettings.enabled}");
Debug.LogError($"INFO: XRSettings.isDeviceActive = {XRSettings.isDeviceActive}");
Debug.LogError($"INFO: XRDevice.isPresent = {XRDevice.isPresent}");
Debug.LogError($"INFO: XRDevice.supportedDevices: ");
foreach (var supportedDevice in XRSettings.supportedDevices) {
Debug.LogError($"\t {supportedDevice}");
}
Debug.LogError($"=======================================================");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment