No "state" set for SteamVR controller actions

Hi I’m using 2019.4.18 with the SteamVR plugin and Oculus. I have Oculus working with the XR framework and UI interactions, buttons, clicking works.

SteamVR I recognize I have to add “actions” to get it to work with the UI.

I have a script that gets references to the actions like this:

private Valve.VR.SteamVR_Action_Boolean triggerAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Trigger");
        private Valve.VR.SteamVR_Action_Boolean gripAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Grip");
        private Valve.VR.SteamVR_Action_Boolean menuAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Boolean>("Menu");
        private Valve.VR.SteamVR_Action_Vector2 axis2dAction = Valve.VR.SteamVR_Input.GetAction<Valve.VR.SteamVR_Action_Vector2>("Axis2D");

And I try to grab the state of the action in Update:

bool state = triggerAction.GetState(Valve.VR.SteamVR_Input_Sources.RightHand);

but state is always false.

I have an action set activated with the “Trigger” action. This used to work, but has broken by some update. I have to enable both the Legacy and New input systems in the Player settings otherwise I get that infuriating dialog when 2019 starts.

Any ideas why the boolean “state” variable is always false?

Follow up. When I create a build, steamvr actions work fine. Only in the Editor are things screwed up.

The SteamVR plugin is developed and maintained by Valve. Please post your issues on their Github so their team can address. You might also take a look at Valve’s documentation SteamVR Unity Plugin | SteamVR Unity Plugin

Hope that helps!