UMA Avatar

revenz

New member
Managed to get UMA down to one error message.

First off, I'm using the new input system. I had to update

C#:
        public static void AddUnityInput(GameObject character)
        {
            if (character.GetComponent<Shared.Input.UnityInput>() == null) {
                character.AddComponent<Shared.Input.UnityInput>();
            }
        }

to

C#:
            if (character.GetComponent<Shared.Input.PlayerInput>() == null) {
                character.AddComponent<Shared.Input.UnityInput>();
            }

inside CharacterBuilder.cs

So if you could make that change so when I upgrade, this doesn't get wiped, I would appreciate it.

Now onto my error:

Error: The animator UMADynamicCharacterAvatar is not designed to work with the Ultimate Character Controller. Ensure the animator has all of the required parameters.
UnityEngine.Debug:LogError (object)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:Awake () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/AnimatorMonitor.cs:128)
UnityEngine.GameObject:AddComponent<Opsive.UltimateCharacterController.Character.AnimatorMonitor> ()
Opsive.UltimateCharacterController.Utility.Builders.CharacterBuilder:AddAnimator (UnityEngine.GameObject,UnityEngine.RuntimeAnimatorController,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/CharacterBuilder.cs:241)
Opsive.UltimateCharacterController.Utility.Builders.CharacterBuilder:AddEssentials (UnityEngine.GameObject,bool,UnityEngine.RuntimeAnimatorController,bool,UnityEngine.Material,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/CharacterBuilder.cs:143)
Opsive.UltimateCharacterController.Utility.Builders.CharacterBuilder:BuildCharacter (UnityEngine.GameObject,bool,UnityEngine.RuntimeAnimatorController,string,string,bool,UnityEngine.GameObject[],UnityEngine.Material,bool) (at Assets/Opsive/UltimateCharacterController/Scripts/Utility/Builders/CharacterBuilder.cs:68)
Opsive.UltimateCharacterController.Integrations.UMA.UMACharacterBuilder:OnCharacterCreated (UMA.UMAData) (at Assets/Opsive/UltimateCharacterController/Integrations/UMA/UMACharacterBuilder.cs:99)
UnityEngine.Events.UnityEvent`1<UMA.UMAData>:Invoke (UMA.UMAData)
UMA.UMAData:FireUpdatedEvent (bool) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:1535)
UMA.UMAGeneratorBuiltin:UMAReady () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:560)
UMA.UMAGeneratorBuiltin:GenerateSingleUMA (UMA.UMAData,bool) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:338)
UMA.UMAGeneratorBuiltin:OnDirtyUpdate () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:454)
UMA.UMAGeneratorBuiltin:Work () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:160)
UMA.UMAGeneratorBuiltin:Update () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:112)

I'm using the "UltimateCharacterControllerDemo" animation controller under "Race Animation Controllers \ Default Animation Controller". But I'm guessing I'm not using the correct avatar. But I just grabbed the prefab "UMADynamicCharacterAvatar" from the "UMA \ Getting Started" folder, so not sure what else I'm supposed to change?
 
That error indicates that the animator that you are using doesn't have all of the parameters that are required. You will need to either use the built in demo animator controller or build your own:

 
Thanks. Yeah it appears to be cleared and set to "None (Runtime Animator Controller)" by something... Like I said I updated the Race default to use "UltimateCharacterControllerDemo" and that's what the animator is set to before running.

But yeah, changing that in runtime manually via inspector fixes it... just have to try figure out where that's being changed....
 
Ok, so to fix I had to set the animation controller to use in the "UMACharacterBuilder". Which I completely overlooked in the guide.

So that's all good now.

However, I cannot add events to the "Character Created (UMAData)" there. I cannot change it from "Off", and I cannot drag in any objects here...

Update: If I disable the custom editor for "UMACharacterBuilder", then I can set the events just fine. So might be a bug there?
 
Sorry for necro. There is indeed a problem with inspector. property field for this event is created after ending change check and applying changes to component. Corrected version:

C#:
GUILayout.Space(5);
EditorGUILayout.LabelField("Events", InspectorStyles.BoldLabel);
EditorGUILayout.PropertyField(PropertyFromName("m_CharacterCreated"));
EditorGUILayout.PropertyField(PropertyFromName("m_AssignCamera"));
if (EditorGUI.EndChangeCheck())
{
    serializedObject.ApplyModifiedProperties();
}

Edit: or actually it should be moved even higher due to Start label (or between camera and end check ofc)
 
Top