using UnityEngine; [ExecuteInEditMode] public class QualitySetup : MonoBehaviour { public Transform highQualityCamera; public Transform lowQualityCamera; private void OnEnable() { if ((bool)highQualityCamera && (bool)lowQualityCamera) { highQualityCamera.gameObject.SetActive(false); lowQualityCamera.gameObject.SetActive(false); int qualityLevel = QualitySettings.GetQualityLevel(); if (SystemInfo.graphicsShaderLevel >= 50 && qualityLevel >= 1) { highQualityCamera.gameObject.SetActive(true); } else { lowQualityCamera.gameObject.SetActive(true); } } else { Debug.LogError("Cameras missing! Different cameras are needed for different performance profiles."); } } }