Search Unity

Asset Bundle For XR And Non XR

Discussion in 'AR/VR (XR) Discussion' started by Nigey, Feb 12, 2019.

  1. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Hi Guys,

    I want to be able to play my game in VR and in normal desktop mode. All the scenes are put in asset bundles. I'm finding when I create the asset bundles with single pass enabled, and then play it in desktop, I get the camera split in two as if I'm viewing in VR. Even though I am affirming XR settings are definitely disabled, via this:

    Code (CSharp):
    1. public class IsXREnabled : MonoBehaviour
    2. {
    3.     // Start is called before the first frame update
    4.     void Awake()
    5.     {
    6.         DontDestroyOnLoad(gameObject);
    7.     }
    8.  
    9.     // Update is called once per frame
    10.     void Update()
    11.     {
    12.         Debug.Log(XRSettings.enabled);
    13.     }
    14. }
    15.  
    Has anyone tried this before? Is it possible? Or will I need to double up on all asset bundles for VR and monitor versions?