private void Update() { if (m_VRWorks == null) { m_VRWorks = Camera.main.GetComponent <NVIDIA.VRWorks>(); } CheckInput(); CheckVRWorksInput(); }
public void Start() { Camera cam = GetComponent <Camera>(); if (cam == null) { // We should be attached to a camera Debug.LogError("VRWorksPresent not attached to camera"); } else { m_VRWorks = cam.GetComponent <NVIDIA.VRWorks>(); } }
private void OnGUI() { if (m_VRWorks == null) { m_VRWorks = Camera.main.GetComponent <NVIDIA.VRWorks>(); } string mode = "None"; NVIDIA.VRWorks.Feature feature = m_VRWorks.GetActiveFeature(); if (feature == NVIDIA.VRWorks.Feature.LensMatchedShading) { mode = "SPS + LMS"; } else if (feature == NVIDIA.VRWorks.Feature.SinglePassStereo) { mode = "SPS"; } else if (feature == NVIDIA.VRWorks.Feature.MultiResolution) { mode = "MRS"; } GUI.Label(new Rect(10, 10, 300, 30), "VRWorks: " + mode, m_GUIStyle); }
public void Start() { Camera cam = GetComponent <Camera>(); m_VRWorks = cam.GetComponent <NVIDIA.VRWorks>(); }