using System; using DG.Tweening; using UnityEngine; public class UiEffectPulse : MonoBehaviour { [SerializeField] private float scaleSize; [SerializeField] private float scaleTime; [SerializeField] private float scaleDelay; [SerializeField] private Ease easing = Ease.Linear; private void Start() { Sequence seq = DOTween.Sequence(); seq.AppendInterval(scaleDelay); seq.Append(transform.DOScale(Vector3.one * scaleSize, scaleTime / 2f)).SetEase(easing); seq.Append(transform.DOScale(Vector3.one, scaleTime / 2f)).SetEase(easing); seq.SetLoops(-1).SetAutoKill(false); seq.Play(); } }