ive baked several camera-animations in maya. After that ive imported the .mb file in unity and selected this file. In the inspector ive added the start- and end-frames for all these different animations and applied these changes.
Then ive attached a camera-object as a child of the gameobject. When i start the game, the default animation is played. Now my question: How is it possible that all my 10 different animations are playing bit by bit automatically (in a playlist-order where i can change the order before i start the game)?
One thing I do on import, considering your animations are set up this way, is to actually make a separate animation clip in Unity called "AllAnims" or something similar and make it encompass the entire timeline (ie frame 1-450) and make that the default animation to play on Awake.
you should have a string array and store the names of those animations in the order that you want in the array inside the inspector.
define it like this
var anims : string[];
i am not sure that string should be written as String in js or not.
i am not a js scripter.
to play animations one by one and after each other you should use Animation.CrossFadeQueued
as a code example you can write
for (var s in anims)
{
animation.CrossFadeQueued(s);
}
i ignored all optional arguments as you see.
let's have an example in C#
foreach (string s in anims)
{
animation.CrossFadeQueued (s);
}
you can stop animations in same layer or wait for all of them with different queuemodes that described well in manual.