static void ReportError(HmdError error) { switch (error) { case HmdError.None: break; case HmdError.VendorSpecific_UnableToConnectToOculusRuntime: Debug.Log("SteamVR Initialization Failed! Make sure device is on, Oculus runtime is installed, and OVRService_*.exe is running."); break; case HmdError.Init_VRClientDLLNotFound: Debug.Log("SteamVR drivers not found! They can be installed via Steam under Library > Tools. Visit http://steampowered.com to install Steam."); break; case HmdError.Driver_RuntimeOutOfDate: Debug.Log("SteamVR Initialization Failed! Make sure device's runtime is up to date."); break; default: Debug.Log(OpenVR.GetStringForHmdError(error)); break; } }
public static extern System.IntPtr Init(ref HmdError peError);
internal static extern IntPtr Init(ref HmdError peError, EVRApplicationType eApplicationType);
internal static extern IntPtr GetStringForHmdError(HmdError error);
internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref HmdError peError);
public static IntPtr Init(ref HmdError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { return OpenVRInterop.Init(ref peError, eApplicationType); }
public static string GetStringForHmdError(HmdError error) { return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdError(error)); }
internal static extern string VR_GetStringForHmdError(HmdError error);
internal static extern IntPtr Init(ref HmdError peError);
public static IntPtr Init(ref HmdError peError) { return OpenVRInterop.Init(ref peError); }
public static IHMD Init(out HmdError peError) { return(new CHMD(VR_Init(out peError))); }
internal static extern IntPtr VR_Init(out HmdError peError);
public static IHMD Init(out HmdError peError) { return new CHMD(VR_Init(out peError)); }
public static IntPtr GetGenericInterface(string pchInterfaceVersion, ref HmdError peError) { return OpenVRInterop.GetGenericInterface(pchInterfaceVersion, ref peError); }