I KNOW this is possible, so: I have (several) models with animation "actions" made in blender, and when exported as FBX I can read them in unity with the animation controller component and all etc.. and that all works fine, HOWEVER:::

I want to find a way (which I KNOW is possible) to be able to access/change the animation states using only C# code, without [manually] creating an animation controller at all (I'm trying to use ONLY coding in unity with no GUI, don't ask if you don't understand...).

Firstly, I know its possible to (somehow) simply switch between animation states, since the animation controller component has access to it, so if I have to make my own build of unity (hopefully it's open source??) then I will...

but besides that, there seems to be something about this on unity's forums, but it says there to export from Maya so I assume it doesn't work in blender, and even if it did I'm not sure how to switch between entire animation states as opposed to just different shapes in general....

So if for some reason the Unity API doesn't allow you to access the animation data of the model at all, then how can I at least create an animation controller component with code and programatically setup all of the transitions etc.? I can't seem to find anything on the unity forums about ADDING a new state with transitions to an animation controller component, and for sure how to set the animation state (and if you can set the animation state with code, that means that you can access the animation data, which is what I want to do anyway...).

SO: please only provide answers that involve ONLY C#, CODE ONLY, no GUI or drag-n-drop solutions wanted.....


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.