- Home /
This question was
closed Jul 04, 2017 at 06:48 PM by
hexagonius for the following reason:
The question is answered, right answer was accepted
Question by
Attapi0 · Jul 03, 2017 at 05:43 AM ·
animationmecanimfinite-state-machine
Determine if there's a transition between the current state and an arbitrary state.
Let's say I have an Animator with an Idle state, a walking state, and a sleeping state. There is no transition from walking to sleeping or vice versa, so the animator must return to idle to switch between these two states (This isn't really the case, but I'm just explaining the concept). How could I determine programatically if there exists a transition between the current state and an arbitrary state?
Comment
Best Answer
Answer by hexagonius · Jul 03, 2017 at 03:37 PM
https://docs.unity3d.com/ScriptReference/Animations.AnimatorState.html
As I see it, an AnimatiorState has a transitions property.