【发布时间】:2016-09-10 14:45:55
【问题描述】:
我正在尝试在显示两个文本之间进行延迟。但它不起作用。 代码是:
public class Class1: MonoBehaviour
{
public Text text1, text2;
public bool inArea = false;
private void Update ()
{
if (!inArea)
{
inArea = true;
text1.text = "";
text2.text = "text2";
StartCoroutine(timer());
text2.text = "text3";
}
}
IEnumerator timer()
{
yield return new WaitForSeconds(100);
}
我也试过WaitForSecondsRealTime()。它也不起作用。
【问题讨论】: