ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.11k stars 1.28k forks source link

PermissionDenied from call to ShowOverlay #606

Open BrettHolton opened 7 years ago

BrettHolton commented 7 years ago

I am using the C# interface and I receive PermissionDenied from all calls to ShowOverlay. Can anyone point me at some documentation for the correct use of ShowOverlay() or explain the siutuations in which PermissionDenied is returned?

lemessur commented 6 years ago

This post is old, but I just had the same issue so I'll respond in case anyone else runs across it. In my case I had created the overlay using CreateDashboardOverlay. Dashboard overlays can only be shown by navigating to them in the Steam VR dashboard. Calling ShowOverlay or HideOverlay for a dashboard overlay will cause this error.

I'm also wondering whether there might be other situations that cause this error. Was your overlay a dashboard overlay?

bddckr commented 6 years ago

You can show dashboard overlays, you just have to use the dashboard API for it: https://github.com/ValveSoftware/openvr/blob/7027f517983ccaae7d972b7735891bb8244e59fb/headers/openvr.h#L3173-L3174

lemessur commented 6 years ago

Ah. Thanks. I hadn’t found that version. I can confirm that it does work for my dashboard overlay. I wonder why it returns void and not EVROverlayError. There are plenty of potential error cases there.