28 lines
567 B
C#
28 lines
567 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
using TMPro;
|
|
using DG.Tweening;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
public class UIInputField : MonoBehaviour
|
|
{
|
|
[SerializeField] private Image _outline;
|
|
[SerializeField] private TMP_Text _text;
|
|
|
|
public async UniTaskVoid ShowErrorAsync(string text)
|
|
{
|
|
_text.text = text;
|
|
|
|
_text.DOFade(1, .25f);
|
|
_outline.DOFade(1, .25f);
|
|
|
|
await UniTask.Delay(2000);
|
|
|
|
_text.DOFade(0, .25f);
|
|
_outline.DOFade(0, .25f);
|
|
}
|
|
}
|