// Use this for initialization //TODO: //set the depth of field target to the camera target if they do not match. //add support for presets to look away from the target //camera shake should cancel out another shake if intensity is high enough //add a screenfade void Awake(){ DontDestroyOnLoad (this.gameObject); if (cm == null) { cm = this; } else { Destroy (this.gameObject); } }
void Awake() { if (cam == null) { DontDestroyOnLoad(gameObject); cam = this; } else if (cam != this) { Destroy(gameObject); } }