[Uniyt]アニメーションを使ったフェード
実行結果
アニメーション設定
Idle
0秒の設定

1秒後の設定

Fade
0秒の設定

1秒後の設定

アニメータの設定
フェード実行条件としてのパラメータを追加します

アニメーションの設定
ループを外します

スクリプト
using UnityEngine;
public class FadeSample : MonoBehaviour
{
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
FadeIn();
}
}
void FadeIn()
{
GetComponent<Animator>().SetTrigger("FadeIn");
}
}
ディスカッション
コメント一覧
まだ、コメントがありません