Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init_PathRegistryNotFound with c# #1816

Open
AlexanderAchberger opened this issue Feb 20, 2024 · 1 comment
Open

Init_PathRegistryNotFound with c# #1816

AlexanderAchberger opened this issue Feb 20, 2024 · 1 comment

Comments

@AlexanderAchberger
Copy link

AlexanderAchberger commented Feb 20, 2024

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.

@AlexanderAchberger
Copy link
Author

AlexanderAchberger commented Feb 22, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant