ValveSoftware / openvr

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

IVROverlay::ShowDashboard: Which parameters are supported / which dashboards exist? #1199

Open JashanChittesh opened 5 years ago

JashanChittesh commented 5 years ago

I use OpenVR.Overlay.ShowDashboard("valve.steam.desktop"); quite a bit ... IIRC; I found that one via some forum.

Especially with SteamVR Input 2.0, it would be very helpful to be able to open e.g. the controller bindings, or the Manage Trackers screen, or the incredibly useful "Show Controls" from within the game:

ShowControls

Having a list of what's available there would be quite awesome. The first place where I looked for such a list was: https://github.com/ValveSoftware/openvr/wiki/IVROverlay::ShowDashboard

I also searched for a method that would return all currently available "dashboards" but that also doesn't seem to exist.

elvissteinjr commented 5 years ago

You can view all currently existing overlays in the Overlay Viewer, which is under the "Developer -> Overlay Viewer" in SteamVR.

I'm not aware of a way to query all of them. There seems to be some sequential numbering for the handles at least per application, but there's zero guarantee for any of this and working with overlays you don't know anything about gives a lot of opportunity of screwing with the application it belongs to.

JashanChittesh commented 5 years ago

Ah, that's very useful! Thank you! I might use system.vrwebhelper.controllerbinding ... one thing I miss is a way to directly call "Manage Vive Trackers".

Btw, there's also away to show the controls as in my screenshot above:

 Valve.VR.OpenVR.Input.ShowBindingsForActionSet(
             Valve.VR.SteamVR_ActionSet_Manager.rawActiveActionSetArray,
             (uint)(System.Runtime.InteropServices.Marshal.SizeOf(typeof(Valve.VR.VRActiveActionSet_t))), 0);

Credit goes to Anders from Virtual Warfighter. There's also a wrapper for it - but that currently doesn't work for me: https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Input/SteamVR_ActionSet.cs#L256

Thanks to Keith for pointing that one out.

EDIT: Quick update, the wrapper works now (since SteamVR Unity Plugin 2.4.5), and there's also a nice wrapper for opening the Binding UI. SteamVR_Input is your friend:

    public void ShowBindings() {
        Valve.VR.SteamVR_Input.ShowBindingHintsForActiveActionSets();
    }

    public void EditBindings() {
        Valve.VR.SteamVR_Input.OpenBindingUI();
    }

The only thing I'm missing now is a way to directly open the Manager Vive Tracker panel.