http://www.facebook.com/SeedTheRenaissanceProject/ Still trying to get my android girl animated in Unity! Can someone please tell me how to fix this error? Sorry, I was following a 2-year-old tutorial! Assets/Locomotion.cs(11.23):errorCS0115:"Locomotion.OnStateUpdate(Animator,UnityEngine.Animator StateInfo,int)' is marked as an override but no suitable method found to override. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Locomotion : StateMachineBehaviour { public float m_Damping = 0.15f; private readonly int m_HashHorizontalPara = Animator.StringToHash ("Horizontal"); private readonly int m_HashVerticalPara = Animator.StringToHash("Vertical"); override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { float horizontal = Input.GetAxis ("Horizontal"); float vertical = Input.GetAxis ("Vertical"); Vector2 input = new Vector2(horizontal, vertical) .normalized; animator.SetFloat(m_HashHorizontalPara, input.x, m_Damping, Time.deltaTime); animator.SetFloat (m_HashVerticalPara, input.y, m_Damping, Time.deltaTime); } }
Hum that really weird, I've just tryied your code snippet in 2017.2 and it works. my guess is there is probably something else in your project that trigger this error as i can't repro it with only this code snippet.
If you haven't found why it does work, please log a bug and we will investigate https://unity3d.com/unity/qa/bug-reporting