using System.Collections; using System.Collections.Generic; using UnityEngine; public class LeanSize : MonoBehaviour { [SerializeField] private float _size; [SerializeField] private float _time; [SerializeField] private LeanTweenType _ease; [SerializeField] private bool _onStart; private void Start() { if (_onStart) LeanAction(); } public void SetSize(float size) { transform.localScale = Vector3.one * size; } [ContextMenu("Debug action")] public void LeanAction() { LeanTween.scale(gameObject, Vector3.one * _size, _time).setEase(_ease); } }