Action
最終更新日時 :
1人が閲覧中
Action は関数そのものを入れられる変数。
public static IEnumerator 待つ(float 秒数, Action 処理)
{
yield return new WaitForSeconds(秒数);
if (処理 != null){処理.Invoke();}
}
StartCoroutine(待つ(2f, () => {
Debug.Log("2秒後に実行");
}));
コメント (Action)
この記事を作った人

