Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature Request Form Factor Unavailable Reloading

Discussion in 'AR' started by holo-aidan, Dec 13, 2022.

  1. holo-aidan

    holo-aidan

    Joined:
    Aug 4, 2021
    Posts:
    4
    Hi,

    I am writing a custom OpenXR runtime to support a remotely connected device. The connection to the remote device is handled within the XrInstance and whilst establishing the connection, calls to xrGetSystem will return XR_ERROR_FORM_FACTOR_UNAVAILABLE. Once established, this will return XR_SUCCESS, if the system information is supported, to continue to create the session and begin rendering.

    The current verified version of Unity's OpenXR Plugin (V1.5.3) handles this return slightly differently. Instead, if a form factor is unavailable it will destroy the instance, unload the runtime, and start from the beginning again (load runtime, create instance, get system). I do not believe this is necessary as the OpenXR documentation states "A return of XR_ERROR_FORM_FACTOR_UNAVAILABLE indicates the form factor is supported but temporarily unavailable; the application may retry xrGetSystem". Additionally, the overview flow chart illustrates that if XR_FORM_FACTOR_UNAVAILABLE is returned, the application should continue to retry xrGetSystem.

    Retrying xrGetSystem, instead of destroying and recreating the instance, would allow runtime developers to carry out additional asynchronous work within the XrInstance before the system is available, such as waiting for a remote device connection.

    Thanks,

    Aidan
     
    AcKeskin likes this.
  2. AcKeskin

    AcKeskin

    Joined:
    Oct 8, 2020
    Posts:
    21
    I am also having this issue.
     
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    525
    Update for followers of this thread: In December I reached out to our OpenXR team with @holo-aidan's note. They have accepted your feature request and are working on this.
     
    AcKeskin and holo-aidan like this.
  4. holo-aidan

    holo-aidan

    Joined:
    Aug 4, 2021
    Posts:
    4
    Thanks for the response, it's good to hear the request has been accepted!

    Will this thread be updated with the progress of the feature request or is there any other platform to track the progress?
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    525
    We don't have a mechanism for folks to track progress of our feature development work, but I've asked them to update this thread with the version number(s) where this work will land once they are ready to merge.
     
    holo-aidan likes this.
  6. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    654
    Any update on this?
     
  7. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    525
    This work has been merged and will be released in version 1.7 of our OpenXR package.
     
    holo-aidan and funkyCoty like this.
  8. aquadragon3d

    aquadragon3d

    Unity Technologies

    Joined:
    Sep 20, 2021
    Posts:
    6
    Hi, wanted to update that OpenXR 1.7 has been released. We added a flag OpenXRRuntime.retryInitializationOnFormFactorErrors that if enabled, will retry xrGetSystem if it throws a form factor unavailable error during initialization. Setting this flag to true should get the functionality you're looking for. Please let us know if you have any additional issues. Thanks!
     
    andyb-unity and holo-aidan like this.
  9. holo-aidan

    holo-aidan

    Joined:
    Aug 4, 2021
    Posts:
    4
    @aquadragon3d thanks for the update and the work on this feature request. I will give this a go and let you know if I have any further issues. Thanks again!