C#/문제해결
0906 DoTween
버스창문
2022. 9. 6. 10:51
public void Blink(TMP_Text a)
{
a.DOFade(0, 1).OnComplete( () => {
a.DOFade(1, 1).OnComplete(()=> { this.Blink(a); });
});
}
onComplete로 쓰면 대리자가 전달이 안되고, 반드시 OnComplete로 써야한다.
대체 왜 저렇게 만들었을까
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using DG.Tweening;
using TMPro;
public class App : MonoBehaviour
{
public static App instance;
// Start is called before the first frame update
void Start()
{
instance = this;
DontDestroyOnLoad(this.gameObject);
SceneManager.LoadScene("Title");
}
public void Blink(TMP_Text a)
{
a.DOFade(0, 1).OnComplete( () => {
a.DOFade(1, 1).OnComplete(()=> { this.Blink(a); });
});
}
}