Search Unity

Question Cannot Deinitialize OpenXRLoader after using camera, why?

Discussion in 'AR' started by AcKeskin, Apr 12, 2023.

  1. AcKeskin

    AcKeskin

    Joined:
    Oct 8, 2020
    Posts:
    27
    Hello,
    In my project I am using ZXing (https://github.com/micjahn/ZXing.Net/tree/master/Clients/UnityDemo) library to get QR code data, which uses webcam texture. After getting the data I stop the webcam texture and disable the script (also modified the example script to dispose the async function etc.). After that I need to uninitialize OpenXr Loader, I call Stop() on the active loader first and it return true, then when I call Deinitialize() it gives a fatal error. I managed to track the issue to the Internal call
    Code (CSharp):
    1. Internal_DestroySession();
    in the OpenXRLoader.cs in the
    Code (CSharp):
    1. public override bool Deinitialize()
    function. Do you have any idea to avoid this error, or what is causing this?
     
  2. thomas_key

    thomas_key

    Unity Technologies

    Joined:
    Dec 14, 2019
    Posts:
    39
    Can you provide more information about the version of Unity/ARF and the device platform you're using ZXing on?
     
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062