Configuring character via script

Hello,

I wrote a script which helps build groups of characters at a time, by calling the CharacterBuilder in a foreach loop. I'm trying to include some code to set root motion to be true (in the UltimateCharacterLocomotion -> Motor field), as well as to add some custom Abilities I've written.

This was my attempt at the first step:

character.GetComponent("UltimateCharacterLocomotion").UseRootMotionPosition = true;

This will execute but it doesn't seem to set the property to true. Is there a better way to do this? This gets called right after the character is finished being built.

Also, is there an API for adding Abilities programmatically?
 
Ah I found it: AbilityBuilder.AddAbility

Don't know why I didn't see that earlier. Never mind about the second question about abilities.

Only question is if I can programmatically turn on UseRootMotion. Thanks!
 
Top