Closed Phantomxm2021 closed 1 year ago
Any update for this problem?
This is a bug. Good catch.
For now you can work around the issue by querying whether or not the CameraData.xrRendering property is true when URP is enabled.
This is a bug. Good catch.
For now you can work around the issue by querying whether or not the CameraData.xrRendering property is true when URP is enabled.
Thank you for your reply. But How can I accessing the CameraData
?
So, looking into this, can you clarify what you mean by "doesn't work", is it a compile error, a runtime error, or does it not output correct values when querying?
So, looking into this, can you clarify what you mean by "doesn't work", is it a compile error, a runtime error, or does it not output correct values when querying?
Incorrect values when querying!
In URP m_CameraAR.stereoEnabled
always return False .
Got it, I tested it on a project with later versions of unity, and I was able to get it to output true and false when using URP in VR and out of VR. Can you give me the unity editor version, arfoundation package version (check the package manager page) and what device are you trying to use with it?
Got it, I tested it on a project with later versions of unity, and I was able to get it to output true and false when using URP in VR and out of VR. Can you give me the unity editor version, arfoundation package version (check the package manager page) and what device are you trying to use with it?
Unity Version:2021.3.21f ARFoundation Version: 5.0.3 Device: mobile
Device: mobile
As in VR on the mobile device itself that requires it be placed in a headset chassis?
Device: mobile
As in VR on the mobile device itself that requires it be placed in a headset chassis?
No! ARFoundation is for AR not VR. When we use the mobile(iPhone -ARkit / Android - ARCore) to use ARFoundation 5.x version in URP, we need to use m_CameraAR.stereoEnabled
to disable the CheckRenderLine
.
I'm interested to know the situation that the camera will be rendering stereo while using the ar foundation package that's on a mobile device, without it being vr. If the stereoEnabled is always false, then you have confirmed that it returns false while it's rendering stereo vision on a mobile device as you stated, the details of the setup is what we need to know in order to reproduce the issue. Or, if possible, it would be helpful for us to have a project that is reproducing the issue with defined steps, in the case that it's too complicated to explain precisely how to get the bug to occur.
If the device is not being used to render a stereo VR image (IE you are not in a multipass or single pass instanced stereo rendering mode) then m_CameraAR.stereoEnabled
always returning false
is the correct behavior.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue as asked and answered. Thanks @DavidMohrhardt! Feel free to re-open it if you have further questions.
This code doesn't work in URP.