void Start() { AttachedCamera = this.GetComponentIfNull(AttachedCamera); if (BoundsCheckerObject == null) { Debug.LogWarning("Bounds checker is null, cannot keep Camera within bounds"); return; } boundsChecker = (IBoundsEnforcer)BoundsCheckerObject; }
/// <summary> /// Define the bounds that the camera must respect /// </summary> /// <param name="BoundsChecker">The bounds to be used</param> public void SetBoundsChecker(IBoundsEnforcer BoundsChecker) { boundsChecker = BoundsChecker; }