Agility Pack - Errors after Adding Abilities and Animations

pako

New member
I have Third Person Controller v.2.3.2 in Unity 2020.3.4f1 and the Agility Pack v.1.0.11.

I had no errors during import and the Demo scenes for both the TPC and Agility Pack run without problems.

I tried to use the Add-Ons Manager, set the Character, which automatically set the attached Animator. Then, after clicking the "Setup Character" button there is an "IndexOutOfRangeException", as per the attached screenshot.

I checked the Character and saw that all the abilities were added. However, I was expecting to see the relative animations added in the Animator Controller, but nothing new gets added. i.e. the Animator Controller contains only the animations which already existed.

Please let me know how I can fix this
 

Attachments

  • Agility Pack - Ability and Animations setup.JPG
    Agility Pack - Ability and Animations setup.JPG
    365.8 KB · Views: 7
The setup will automatically add the animations to the layers that it was created with. In this case crawl was added to the full body layer (12) and my guess is that you are using an animator that doesn't have the 12th layer. I would use a demo animator controller first and then transfer the animations to your own animtor.
 
I followed the documentation instructions to create a new animator controller: Create a new character that references a new animator so that all the required parameters are added to the new animator. Then, use that animator with the game's character and delete the new character. However, during the new character creation (I tried using the game's character, and Nolan with the same result), only the parameters get copied, not the layers. Apparently, this is why the problem is created.

BTW, the crawl animation isn't the only problem, since other animations in the agility pack use other layers too, and none of them got copied.

I'm currently only using the Base Layer for my existing animations, and I'm not sure how to add the layers from the demo animator, together with the relative avatar masks, to my custom animator. Is there a quick way to do it, or do I have to create it one by one and use the relative avatar mask in each one?
 
I added a check to ensure there is the correct number of layers so you'll no longer get the exception, but for that button to work you must have the same number of layers as the demo animator. In your case since you are using your own animator controller (which I do recommend) you'll either need to create the states from scratch or manually copy the states from the demo animator. You should not use the button.
 
I added a check to ensure there is the correct number of layers so you'll no longer get the exception, but for that button to work you must have the same number of layers as the demo animator. In your case since you are using your own animator controller (which I do recommend) you'll either need to create the states from scratch or manually copy the states from the demo animator. You should not use the button.

Would it work to just duplicate the demo animator, and then remove all demo animations from each layer, rather than the procedure I followed (above) which just adds the parameters but not the layers.

This way, the duplicate animator would have both the parameters and the layers and then be customized with the required animations for a game. I think that the agility pack animations should then be added to the duplicate without a problem.
 
Would it work to just duplicate the demo animator, and then remove all demo animations from each layer, rather than the procedure I followed (above) which just adds the parameters but not the layers.

Yes, it would.
 
Top