Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation shows as playing but does not appear on character

Discussion in 'Animation' started by silverleecams, Jul 27, 2022.

  1. silverleecams

    silverleecams

    Joined:
    May 12, 2022
    Posts:
    51
    What title sounds like. I have a character controller component and an animator component meant to animate my character as well as a script to activate it. It shows as activating the animation in the animator window, but my character is static - any ideas?

    Here's my simple script:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class Animations : MonoBehaviour
    6. {
    7.     public GameObject player;
    8.     void Update()
    9.     {
    10.         if (Input.GetButtonDown("Vertical"))
    11.         {
    12.             player.GetComponent<Animator>().Play("Walk");
    13.         }
    14.  
    15.     }
    16. }
    17.  
     
  2. silverleecams

    silverleecams

    Joined:
    May 12, 2022
    Posts:
    51
    Found out Blender didn't export any of my animations for some reason. Make sure you select everything before exporting!