This dev diary is a quick run down of how we got the Unity Assets, Horse Animset Pro (HAP) and Unity Multipurpose Avatar (UMA), to work together. Here’s our video (more details below):
I had to set all Bone References after the UMA Dynamic Character Avatar (DCA) was generated. Use the Created event on the UMA to fire a function to do this. Some minor changes were also made to the Malbers classes. This may not be necessary on newer versions though (4.0 and up).
Our event function does the following:
Get the Malbers Components on which to set the references
Get references to the required bone transforms
Create EquipPoint GameObjects for Left and Right hands
Parent them to the appropriate bone transform
add an offset and rotation
Create Holder GameObjects for Back, Left and Right
Parent them to the appropriate bone transform
add an offset and rotation
Instantiate the required weapons
Parent each to the appropriate holder
Add each to the inventory
Set the Transform references on the RiderCombat component for the Holders and EquipPoints
Re-set the Head, Chest, Hands and Shoulder references on the RiderCombat component
Re-set the AimOrigin to the Head transform on the IAim component
Changes made to the Malbers classes:
On the RiderCombat class, the setters for the Head, Chest, Hands and Shoulders references were not public. I had to change this.
On the IInventory I decided to change the Inventory variable from being a GameObject array to a GameObject List instead.