Finds the active installation of vrclient.dll and initializes it */
(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "")
| 8836 | |
| 8837 | /** Finds the active installation of vrclient.dll and initializes it */ |
| 8838 | public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "") |
| 8839 | { |
| 8840 | CVRSystem pSystem = null; |
| 8841 | |
| 8842 | try |
| 8843 | { |
| 8844 | VRToken = InitInternal2(ref peError, eApplicationType, pchStartupInfo); |
| 8845 | } |
| 8846 | catch (EntryPointNotFoundException) |
| 8847 | { |
| 8848 | VRToken = InitInternal(ref peError, eApplicationType); |
| 8849 | } |
| 8850 | |
| 8851 | OpenVRInternal_ModuleContext.Clear(); |
| 8852 | |
| 8853 | if (peError == EVRInitError.None && !IsInterfaceVersionValid(IVRSystem_Version)) |
| 8854 | { |
| 8855 | peError = EVRInitError.Init_InterfaceNotFound; |
| 8856 | } |
| 8857 | |
| 8858 | if (peError == EVRInitError.None) |
| 8859 | { |
| 8860 | pSystem = OpenVR.System; |
| 8861 | peError = pSystem.SetSDKVersion(k_nSteamVRVersionMajor, k_nSteamVRVersionMinor, k_nSteamVRVersionBuild); |
| 8862 | } |
| 8863 | |
| 8864 | if (peError != EVRInitError.None) |
| 8865 | { |
| 8866 | pSystem = null; |
| 8867 | ShutdownInternal(); |
| 8868 | } |
| 8869 | |
| 8870 | return pSystem; |
| 8871 | } |
| 8872 | |
| 8873 | /** unloads vrclient.dll. Any interface pointers from the interface are |
| 8874 | * invalid after this point */ |
nothing calls this directly
no test coverage detected