private void OnEnable() { if (cameras.Count < 1) { if (GetComponent <Camera>()) { cameras.Add(GetComponent <Camera>()); } } if (cameras.Count < 1) { if (Camera.main) { cameras.Add(Camera.main); } } if (cameras.Count < 1) { //Debug.LogError("Camera Shake: No cameras assigned in the inspector!"); } instance = this; }
private void OnEnable() { if (cameras.Count < 1) { if (GetComponent<Camera>()) cameras.Add(GetComponent<Camera>()); } if (cameras.Count < 1) { if (Camera.main) cameras.Add(Camera.main); } if (cameras.Count < 1) { Debug.LogError("Camera Shake: No cameras assigned in the inspector!"); } instance = this; }