アニメーター/扉を開くアニメーションの実行















扉を開くアニメーションの発動
using UnityEngine;
public class OpenGate : MonoBehaviour
{
private Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
void Update()
{
if(Input.GetKeyDown(KeyCode.P))
{
// アニメータコントローラで設定したパラメータを記載する(ポイント)
anim.SetTrigger("Open");
}
}
}



【Unity6版】BattleTank(全31回)
他のコースを見る