/// <summary> /// If 'latest_bounds' is false, then it will use cached bounds to calculate visibility. /// Otherwise, it will recalculate the bounds immediately. /// </summary> public bool CheckInView(Transform transform, bool force_to_refresh) { if (force_to_refresh) { cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera); } return(cached_bounds_.Contains(transform.position)); }
public Bounds GetCachedCameraBounds(bool force_to_refresh) { if (force_to_refresh) { cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera); } return(cached_bounds_); }
void Update() { Track(target); cached_bounds_ = ScreenUtil.CalculateOrthographicBounds(camera); }