I'm using the Google Cardborad XR Plugin for Unity 1.23.0 package in Unity 2022.3.9f1 version.
When I build the project and install it on my mobile device and run it, the screen is forcibly separated into two screens.
I want to use it like a regular mobile screen, so when I exit VrMode, mobile gyro and object interactions also don't run.
Is there a way to change the screen to a normal mobile screen while using the XR feature on the Unity Cardboard?
The following scripts were used to run and shut down VrMode.
private IEnumerator StartXR()
{
Debug.Log("Initializing XR...");
yield return XRGeneralSettings.Instance.Manager.InitializeLoader();
if (XRGeneralSettings.Instance.Manager.activeLoader == null)
{
Debug.LogError("Initializing XR Failed.");
}
else
{
Debug.Log("XR initialized.");
Debug.Log("Starting XR...");
XRGeneralSettings.Instance.Manager.StartSubsystems();
Debug.Log("XR started.");
}
}
private void StopXR()
{
Debug.Log("Stopping XR...");
XRGeneralSettings.Instance.Manager.StopSubsystems();
Debug.Log("XR stopped.");
Debug.Log("Deinitializing XR...");
XRGeneralSettings.Instance.Manager.DeinitializeLoader();
Debug.Log("XR deinitialized.");
_mainCamera.ResetAspect();
_mainCamera.fieldOfView = _defaultFieldOfView;
}