0
votes

I am adding UnityPlayer inside Android View. I am trying to use 2 different scenes for AR in Unity. Scene: 1 => Welcome screen to decide,device supports ARCore Scene: 2 => If the device supports ARCore, launch ARcore scene from my Android Activity Scene : 3 => If the device does not support ARCore, launch Vuforia scene from my Android Activity

So, for scene 1, I need to enable ARCore Supported in XR Settings For scene 2, I need to enable Vuforia Augmented Reality Supported in XR settings Not able to enable both options. So is it possible to set these options at runtime, before launching Unity Player from my Activity?

1
Yes,that answer completely disable/enable XR settings.But my question is,how to enable particualar XR settings,either Vuforia or ARCore. - Ramprasad
I might run into similar situation. could you show how add unity scene and player into android view? Thanks - flankechen

1 Answers

1
votes

No. You can't currently do this now but this might change in the future. The reason is because there is no way to disable ARCore at this moment. You can probably suggest that as a feature on their Github page and explain you need it.

For Vuforia, you can disable it with VuforiaBehaviour.Instance.enabled = false; and enable it by setting it to true again.

The problem is that you can't do the-same with ARCore. You might be able to do the-same thing by finding all ARCore components in the scene and disabling them but I am not sure if that will release the camera or even work at-all.