ValveSoftware / openxr_engine_plugins

Contains Valve-provided plugins for using OpenXR extensions with various game engines
BSD 3-Clause "New" or "Revised" License
50 stars 15 forks source link

XR_ERROR_ACTIONSETS_ALREADY_ATTACHED #1

Open RemiArnaud opened 2 years ago

RemiArnaud commented 2 years ago

Thanks a lot for putting this together. Varjo just released 3.4 that includes the XR_HTCX_vive_tracker_interaction extension.

When testing the OpenXRViveTracker I have the following problem:

1) xrCreateActionSet is called in PostCreateInstance - at plugin initialization 2) xrAttachSessionActionSets is called by FOpenXRInput::Tick() as bActionsBound is false on the first Tick 3) xrSuggestInteractionProfileBindings is called in OnBeginSession this results in XR_ERROR_ACTIONSETS_ALREADY_ATTACHED error as per the specification: "If the action set for any action referenced in the suggestedBindings parameter has been included in a call to xrAttachSessionActionSets, the implementation must return XR_ERROR_ACTIONSETS_ALREADY_ATTACHED."

its a bummer that Tick() gets called before OnBeginSession, but the order of execution does not work as xrSuggestInteractionProfileBindings needs to be called before xrAttachSessionActionSets

ROBYER1 commented 2 years ago

Is this related at all to the black screen bug I am getting with this issue once I set up a Vive tracker with OpenXR in SteamVR + Unity? https://github.com/ValveSoftware/unity-xr-plugin/issues/114

I have added an issue for it here as I have been chasing Steam Support and the SteamVR discussions forum which have both been dead ends