FreshRSS

Normální zobrazení

Jsou dostupné nové články, klikněte pro obnovení stránky.
PředevčíremHlavní kanál
  • ✇Recent Questions - Game Development Stack Exchange
  • Animator.SetTrigger not workingQuoc Dung Vu
    I'm new to Unity. I'm trying to create a black screen transition when pressing a button using SetTrigger(). However it's not working. It doesn't even play at the start of the game. Can anyone help me? Here is my code: // Update is called once per frame void Update() { if (Input.GetKeyDown("x")) { Debug.Log("Hello"); anim.SetTrigger("Crossfade"); } } My settings:
     

Animator.SetTrigger not working

I'm new to Unity. I'm trying to create a black screen transition when pressing a button using SetTrigger(). However it's not working. It doesn't even play at the start of the game. Can anyone help me?

Here is my code:

// Update is called once per frame
void Update()
{
    if (Input.GetKeyDown("x")) {
        Debug.Log("Hello");
        anim.SetTrigger("Crossfade");
} }

My settings:

enter image description here

enter image description here

enter image description here

❌
❌