- Home /
Can not get Animationstate list inside Animator?
In a RPG game, a class that acts as a skill trigger for a character must possess a skill name as a member.
If you input the value of this variable directly through TextField, there may be a problem such as typographical errors.
I'm considering creating a CustomEditor for the skill trigger class to get the names of the AnimationStates inside the animator at OnEnable, and let PopUp process them. If the name changes (= the name recorded in the current trigger does not exist inside the animator) it will throw an Exception.
The closest approach would be to access the StateMachineBehaviour, but even this could not figure out the name of the AnimationState it was equipped with. (Although you can write it down on the member, this is the same context as the first one)
Is this impossible? While trying to implement a series of operations, I felt that Mecanim's Animator had a very different structure from the system in the general scene.
Your answer
Follow this Question
Related Questions
Changing animation when moving horizontally without flipping sprite 0 Answers
How can I add a motion clip to the animator state by script? 0 Answers
How to Play an animation state on an animator controller on collision? 1 Answer
Get an Animator state inside an AnimationEvent callback of the last frame 2 Answers
How to check progress of current animation state in Animator from script? 0 Answers