Hello,
Related to this thread, I am currently building my character controller at runtime - due to my character's model/rig not being available at editor time.
The CharacterBuilder approach is working fine, but I'm struggling to add new Opsive.Shared.StateSystem.State(s) to my UltimateCharacterLocomotion class.
It appears that the StateManager is responsible for initializing States and generating their delegates. However, I can't seem to find a way to initialize my states as I add them at runtime.
To be clear, my goal is to add State(s) to the controller as I'm building it - and then conditionally activate them.
If I try to overwrite them after calling CharacterBuilder.BuildCharacterComponents, they will not be initialized - and their delegates won't exist.
Is there a way to properly add States (defined in the inspector for my runtime build script, ideally) to a controller during runtime and have their delegates generated so that they can be used?
Thanks!
Addy
Related to this thread, I am currently building my character controller at runtime - due to my character's model/rig not being available at editor time.
The CharacterBuilder approach is working fine, but I'm struggling to add new Opsive.Shared.StateSystem.State(s) to my UltimateCharacterLocomotion class.
It appears that the StateManager is responsible for initializing States and generating their delegates. However, I can't seem to find a way to initialize my states as I add them at runtime.
To be clear, my goal is to add State(s) to the controller as I'm building it - and then conditionally activate them.
If I try to overwrite them after calling CharacterBuilder.BuildCharacterComponents, they will not be initialized - and their delegates won't exist.
Is there a way to properly add States (defined in the inspector for my runtime build script, ideally) to a controller during runtime and have their delegates generated so that they can be used?
Thanks!
Addy