How to add new state to UnityInput script through script

kentreva

Member
Hi! Wondering if you can help with this?

I'm setting up Dialogue System with Opsive's Ultimate character controller following these steps, and i'm making an editor to do some of the steps automatically when setting up a new player character.

How would I add the Conversing state to the UnityInput component through script?
1653785619285.png

Here's the corresponding step on the pixel crushers docs i want to automate:
1653785602201.png

Here's my code. I copied it from the docs but it doesn't seem to work.
public Preset conversingPreset;
1653786925156.png
No errors. just does nothing.
Thank you so much for your guidance!
 
StateManager.AddState is correct. I tried the example from the docs and it worked - maybe your UI isn't updating?
 
Top