// Use this for initialization void Start() { cam = GetComponent <Camera>(); scaledWidth = (int)(Screen.width * scaleFactor); scaledHeight = (int)(Screen.height * scaleFactor); cam.cullingMask = ~(1 << LayerMask.NameToLayer("Distortion")); cam.depthTextureMode = DepthTextureMode.Depth; maskCam = new GameObject("Distort Mask Cam").AddComponent <Camera>(); maskCam.enabled = false; maskCam.clearFlags = CameraClearFlags.Nothing; musicTest = GameObject.FindGameObjectWithTag("Audio").GetComponent <MusicTest>(); }
private void Awake() { instance = this; }