- Home /
Mecanim and script behaviour issue
I've encountered a problem with Mecanim and a script which is attached to a state. When I press play and start testing my state machine everything works fine besides one state. Mecanim enters the state but the script attached to it isn't called (testes with a Debug.log(...) inside the OnStateEnter() method) It works in every other state and I recreated the state several times but the issue still persists. The animation speed of this state is set to 0.2. I tried the following:
If i mute the default transition, which is used if no trigger is set, so the state persists in its current state and can only leave if the trigger is activated. In this case the OnStateEnter() method is called every time.
If i press play and it is not working as always but i change the state speed to any number ( yes any number including from 0.2 to 0.2 in which case no obvious nothing changed at all) it works like a charm every single time....
especially the last part brought me to a point where i can'n figure out why Mecanim would behave that way and i hope somebody could help me....
thanks in advance
Answer by Diocore · Oct 26, 2016 at 07:49 PM
Okay I updated unity to the newest version and apparently it works now. I also tested this bug on to machines and it remained the same. But the unity update has done the trick...at the moment at least
Your answer
Follow this Question
Related Questions
StateMachineBehaviour: Where should I set up references? 2 Answers
StateMachineBehaviour + StartCoroutine() 2 Answers
Mecanim transition retargeting and conditional exit to any state? 0 Answers
State machine callbacks not being called on mobile iOS? 1 Answer
[StateMachineBehaviours] All prefabs share same state machine. 0 Answers