using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class VRDetector : MonoBehaviour {

    #if UNITY_ANDROID && !UNITY_EDITOR
//#if UNITY_ANDROID
    private const bool VR = true;
#else
    private const bool VR = false;
#endif

    public GameObject NormalCamera;
    public GameObject VRCamera;

    // Use this for initialization
    void Start () {
        if (NormalCamera != null)
        {
            NormalCamera.SetActive(!VR);
            var cam = NormalCamera.GetComponent<Camera>();
            if(cam != null) cam.enabled = !VR;
        }
        if (VRCamera != null)
        {
            VRCamera.SetActive(VR);
            var cam = VRCamera.GetComponent<Camera>();
            if (cam != null) cam.enabled = VR;
        }
    }
}
