Get Animation in the Editor
Hi.. Quick question. I'm trying to get an Animation in the Editor. I've just begun experimenting with the Editor, so the knowledge of it, isn't much.
Animation a = AssetDatabase.LoadAssetAtPath<Animation>("Assets/Animations/Idle.anim") as Animation;
Here, there is a character with an idle stance, which I am trying to get, so I can tweak it.
the Animation "a" always returns null :( help.
Answer by Hemming · May 09, 2019 at 01:24 PM
I figured it out:
AnimationController a = AssetDatabase.LoadAssetAtPath("Assets/Animations/Idle.anim") as AnimationController;
The files aren't the same as the components in game objects.
Your answer
Follow this Question
Related Questions
Why does this keep happening? 0 Answers
Model not visible during Play - is visible when I switch to "Scene" view then back to "Game?" 0 Answers
How does one copy and paste keyframes in the Animation Editor? 4 Answers
Applying values from an animationClip to bones of a skinnedMesh via code? 0 Answers
not showing onPreviewGUI in StateMachineBehaviour Editor 0 Answers