Init_PathRegistryNotFound with c#
Hi all,
I am trying to Initialize openvr in a own c# application. I added the openvr_api.dll and openvr_api.cs file in my project and tried to initialize openVR:
...
using Valve.VR;
public MainPage()
{
this.InitializeComponent();
EVRInitError error = EVRInitError.None;
CVRSystem CVR = Valve.VR.OpenVR.Init(ref error, EVRApplicationType.VRApplication_Utility);
if (error is EVRInitError.None)
{
}
}
However, error is always Init_PathRegistryNotFound. My steamVr it turned on and my HMD is detected. Unity applications are also working with SteamVR.
Is there something I am doing wrong? Do I have to assign a path somewhere?
Thanks a lot.
I checked the code and discovered the problem is the function CVRPathRegistry_Public::GetPaths . Here it tries to open and read the file openvrpaths.vrpath in my local app data folder. On my system, the file exists and contains path information. I do not understand why CVRPathRegistry_Public::GetPaths does not find that file.
However, if I set the environment variables VR_OVERRIDE VR_CONFIG_PATH VR_LOG_PATH I am receiving the error VRInitError_Init_NoLogPath.
Any ideas what the problem could be?