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.
  2. Dismiss Notice

Question Need to Get D3D11 Device of Unity's OpenXR Session

Discussion in 'AR' started by AliCanKeskin, Aug 8, 2022.

  1. AliCanKeskin

    AliCanKeskin

    Joined:
    Jun 7, 2022
    Posts:
    17
    Hello everyone. I have an OpenXR app and I need to get the D3D11 Device and pass it into my native (C++) library because I am starting a new session there and when I destroy that session and try to go back to Unity's session I can get the Update from Unity but I cannot render anything. Do you know any way to get that D3D11 device?
     
  2. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
  3. AliCanKeskin

    AliCanKeskin

    Joined:
    Jun 7, 2022
    Posts:
    17
    So, you are telling me there's no way to do it form the C# side. If I may, I want to ask you, do you have any idea why I am not rendering anything even if I can get prints and other stuff from Update() method of Unity? Is there a way to reset the rendering system?
     
  4. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    It sounds like you have a native library anyway, why do you want it from the c# side? You can just link your native library against those headers and get the D3D11Device from them directly.

    Looks like your other post asked this, https://forum.unity.com/threads/how-to-properly-restart-the-xr-session.1320351/ - hope that helps.