I’m fairly new to unity and I have spent the last 2 hours searching for a solution, this seems to work in unity 4 but there must have been a change in unity 5. I have a idle animation and then a animation set to run when the speed is higher than 0.01. I don’t know what is going on, I get no errors and it simply doesn’t play the animation.
using UnityEngine;
using System.Collections;
[SerializeField]
public class PlayerController : MonoBehaviour {
public float maxSpeed = 10f;
bool facingRight = true;
public Rigidbody2D Rb;
You can debug your statemachine with live link.
open up the animator windows and simply select your gameobject with your animator while in play mode.
You should see some live feedback and which state is currently playing. Also you can see live feedback on parameter so you can debug if your call to SetFloat(“Speed”) actually work.
If you still see your run state playing then my guess is that maybe apply root motion is disabled. We did change apply root motion behaviour between 4.x and 5.0
Thanks but in another post on a different problem someone gave me the answer to solve this aswell without even meaning it…
I was trying to get the animator the old unity 4 way…