public void UpdateValues() { var type = ScalerDataUtils.GetCurrentScalerType(); CameraScalerData currentData = data.Value[type]; if (currentData.useFov) { DOVirtual.Float( virtualCamera.m_Lens.FieldOfView, currentData.fov, transitionDuration, newValue => virtualCamera.m_Lens.FieldOfView = newValue).SetEase(Ease.InCirc); } if (currentData.usePosition) { if (useLocalPosition) { transform.DOLocalMove(currentData.offsetPosition, transitionDuration).SetEase(Ease.InCirc); } else { DOTween.To( () => cinemachineTransposer.m_FollowOffset, offset => cinemachineTransposer.m_FollowOffset = offset, currentData.offsetPosition, transitionDuration).SetEase(Ease.InCirc); } } }
public void UpdateValues() { float currentData = data.Value[ScalerDataUtils.GetCurrentScalerType()]; canvasScaler.matchWidthOrHeight = currentData; }
public float GetCurrentValue() { return(Value[ScalerDataUtils.GetCurrentScalerType()]); }