UMA

The Ultimate Character Controller is integrated with UMA allowing your character to be created dynamically while being controlled by the Ultimate Character Controller. Version 2.8 or later of UMA should be used for this integration.

There are two different options for using the Ultimate Character Controller with UMA. The first option uses UMA’s Bone Builder tool which creates all of the bones necessary at edit time so you can then use the Character Manager like any other character. The second method adds all of the Ultimate Character Controller components after UMA has created the character. This option is more advanced and is recommended for those with programming experience as you will likely need to do some scripting in order to get the most out of it.

Bone Builder

UMA’s Bone Builder tool creates all of the bones necessary for your character at edit time which allows you to use the Ultimate Character Controller editors like normal. To the Ultimate Character Controller it doesn’t even know that UMA was used and no integration components are required.

  1. Download the UMA integration.
  2. Drag your UMA Dynamic Character Avatar prefab into your scene.
  3. Open the UMA Bone Builder under the UMA Toolbar.
  4. Select the UMA Dynamic Character Avatar in your scene as the UMA GameObject.
  5. Select the Generate Bones button. UMA Should create all of the bones required for the character.
  6. Build your character like normal through the Character and Item Managers.
  7. Select the child UMADynamicCharacterAvatar GameObject and inspect the Dynamic Character Avatar component. This component is located underneath the main character GameObject.
  8. The following changes need to be applied to the DynamicCharacterAvatar component:
    1. Set the Additional Utility Recipes array to 0.
    2. Set the Default Animator Controller to the Animator Controller that has been added to your character, such as Demo.
    3. Under the Advanced Options foldout enable Keep Avatar and Keep Animator Controller. The Animator Controller field should also be set to the Animator Controller specified in the previous step.
  9. Set the Controller field on the Animator component to the same value as specified in the previous step.
  10. UMA doesn’t work with Transforms that have the same name. Rename the “Items” GameObject to a unique value such as “RightItems” or “LeftItems” to ensure UMA doesn’t throw any errors.
  11. Your UMA character is now ready to be used.

Runtime Creation

The UMA Character Builder component can add the Ultimate Character Controller components after UMA has created the character at runtime. This method does not require the bones to be added ahead of time using Bone Builder. This option is meant for more advanced uses that have experience with both UMA and the Ultimate Character Controller as there will likely be some scripting required to customize your character.

  1. Download the UMA integration.
  2. Drag your UMA Dynamic Character Avatar prefab into your scene.
  3. The following changes need to be applied to the DynamicCharacterAvatar component:
    1. Set the Additional Utility Recipes array to 0.
    2. Set the Default Animator Controller to the Animator Controller that has been added to your character, such as Demo.
    3. Under the Advanced Options foldout enable Keep Avatar and Keep Animator Controller. The Animator Controller field should also be set to the Animator Controller specified in the previous step.
  4. Set the Controller field on the Animator component to the same value as specified in the previous step.
  5. Add the UMA Character Builder component to your UMA Dynamic Character Avatar. This component will add all of the Ultimate Character Controller objects and execute after UMA has created the character. If you’d like to execute any code after the character has been created you can do so by adding your code to the Character Created event.
    The options within the UMA Character Builder are similar to the options within the Character Manager. There are a few key differences:

    • First/Third Person Movement Type is specified by class name. For example, “Opsive.UltimateCharacterController.FirstPersonController.Character.MovementTypes.Combat” points to the Combat Movement Type for the first person perspective.
    • First Person Hidden Object Names uses the transform name to determine which objects should be hidden while in a first person view. In the screenshot the Head GameObject will be hidden. The names are relative to the character’s base Transform.
    • First Person Base Objects optionally specify any First Person Base Objects that should be dynamically generated by UMA and added to the added to the character. See step 6 for more details.
    • Assign Camera specifies if the camera should be assigned after the character has been created.
  6. Optionally add the UMA Ability Builder or UMA Item Pickup components to the same GameObject as the UMA Character Builder was added to.  These components will likely need to be expanded to completely customize your character and will require scripting experience.
  7. If you’d like to use a UMA created character for your first person arms you can do so by specifying the UMA character that you’d like to use within the First Person Base Objects array of the UMA Character Builder. This requires another UMA Dynamic Character Avatar to be placed in the scene with the UMA First Person Base Object component added to it.
  8. This UMA character can be a generic object so you can use a generic set of arms with the main character model. A great video which shows how to do this is located here. The UMA First Person Base Object component contains the following parameters:
    • Local Position/Rotation specifies the local position and rotation that the UMA First Person Base Object should spawn underneath the character’s First Person Base Objects Transform.
    • Item Slot Locations specifies the child Transform path that Item Slot component should be added to.
    • Animator Controller refers to the Animator Controller that should be added to the GameObject.
  9. When Unity enters play mode the character will now first be created by UMA and then able to be controlled by the Ultimate Character Controller.