[SOLVED] Another UMA integration thread

Chrysopy

New member
Good day,

Since this is my first post on these forums, allow me to begin with congratulations to Opsive on their work. Capital stuff! (y)

Now, could someone help me set up FPS controller with the UMA Character Builder?

First of all, I can get Nolan to work at a basic level, the game runs and I have locomotion.

I can also get an UMADynamicCharacterAvatar prefab to work along the same lines, after using bone builder and setting it up manually in Character Manager.

However I cannot get the game to run without errors when using UMA Character Builder with the UMADynamicCharacterAvatar prefab.

When I hit play, the game almost starts, then the UMA gets stuck in between T-pose and idle and ItemEquipVerifier.cs throws this error:
Error: At least one EquipUnequip ability must be added to the character in order for the ItemEquipVerifier ability to work.
.

However I can unpause the game and my character is functional (can walk/run around in first person perspective)

Does that sound familiar to anybody? I followed the instructions in the manual. (I also noticed that unless I untick "init character on awake" from Camera Controller, the game won't run because it tries to find the locomotion component before it's been created by UMA character builder, which has "
Assign Camera" probably for this exact reason.)

I tried to do this in Unity 2019.2 and 2019.3:

Here are repro steps:

1. Start a Unity 2019.2 project.
2. Have UMA, First Person Controller assets and UMA.unitypackage (integration files) compiled without errors
3. Add a cube to the scene for the UMA to stand on.
4. run Tools> Opsive > Main Manager
5. Click "Add Managers", "Setup Camera", "Add UI"
6. Go to folder UMA > Getting Started.
7. Add to scene the prefabs UMA_DCS and UMADynamicCharacterAvatar (stand the latter on the cube).
8. Select GameObject UMADynamicCharacterAvatar and view Inspector.
9. Under Dynamic Character Avatar, Change Additional Utility Recipes's size to "0" and change the Race Animation Controller to FirstPersonControllerDemo
10. Add Component > UMA Character Builder
11. Under UMA Character Builder, tick "Add First Person Perspective", Change First Person Hidden Object Names size to "1" and type in "Head" , change First Person Base Objects to size "0", untick "Add Third Person Perspective", change the Objects Animator Controller to "FirstPersonControllerDemo".
12. Select the Main Camera game object and view Inspector.
13. Under Camera Controller, untick "Init Character On Awake"
14. Hit "Play"
15. Not a whole lot of shaking going on. (if Error Pause is on, that is..)
16. View the Console, an error is shown:
Error: At least one EquipUnequip ability must be added to the character in order for the ItemEquipVerifier ability to work.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.Character.Abilities.ItemEquipVerifier:Awake() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/ItemEquipVerifier.cs:50)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:set_Abilities(Ability[]) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:181)
Opsive.UltimateCharacterController.Utility.Builders.AbilityBuilder:AddAbility(UltimateCharacterLocomotion, Type, Int32) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/AbilityBuilder.cs:85)
Opsive.UltimateCharacterController.Utility.Builders.AbilityBuilder:AddAbility(UltimateCharacterLocomotion, Type) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/AbilityBuilder.cs:58)
Opsive.UltimateCharacterController.Utility.Builders.CharacterBuilder:BuildCharacterComponents(GameObject, Boolean, Boolean, ItemCollection, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/CharacterBuilder.cs:380)
Opsive.UltimateCharacterController.Integrations.UMA.UMACharacterBuilder:OnCharacterCreated(UMAData) (at Assets/Opsive/UltimateCharacterController/Integrations/UMA/UMACharacterBuilder.cs:102)
UnityEngine.Events.UnityEvent`1:Invoke(UMAData)
UMA.UMAData:FireUpdatedEvent(Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:1229)
UMA.UMAGeneratorBuiltin:UMAReady() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:392)
UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:277)
UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:291)
UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

What am I missing?

When I inspect the UMA DynamicsCharacterAvatar during Play, I notice that EquipUnequip under "Item Abilities" is enabled, but "Item Verifier" is disabled (probably due to the error).

Halp ¯\_(ツ)_/¯

Thank you,
 
Since this is my first post on these forums, allow me to begin with congratulations to Opsive on their work. Capital stuff!
Thank you!

What am I missing?
I don't think anything - the ItemEquipVerifier ability is being added before the EquipUnequip ability so it is throwing errors. You can fix this by chaning CharacterBuilder.BuilderCharacterComponents so the ItemEquipVerifier is added after the item abilities are added. Move:

Code:
                if (addItems) {
                    AbilityBuilder.AddAbility(characterLocomotion, typeof(Character.Abilities.ItemEquipVerifier));
                }
to the end of the last if(addItems) statement:
Code:
                }

                // The ItemEquipVerifier needs to be added after the item abilities. NEW
                AbilityBuilder.AddAbility(characterLocomotion, typeof(Character.Abilities.ItemEquipVerifier)); // NEW
                AbilityBuilder.SerializeAbilities(characterLocomotion); // NEW
            }
 
So simple, I thought execution order was the culprit..but I'm still lacking proper debugging skills.
I did what you suggested and it worked like a charm!
 
Top