InControl Rebinding

zambii

New member
Hello, I need a little bit of help with the InControl integration for UCC.

I'm trying to change the 'ActionSet' of the character but because the 'ActionSet' field in the character does not have the 'get' accessor I am unable to change it according to InControl's API.

This is the line of code of that is the correct way according to InControl's API:
C#:
character.GetComponent<Opsive.UltimateCharacterController.Integrations.InControl.InControlInput>().ActionSet.Load(PlayerProfile.PlayerActionSetBindings);

Is there a different way to do this through integration? What am I missing?
 
I just did that and that is the correct solution.

For anyone searching for this before the asset is updated just add the get accessor to that property:

C#:
public PlayerActionSet ActionSet
        {
            get { return m_Bindings as PlayerActionSet; } //<---- Like so.
            set
            {
                if (value == null) {
                    Debug.LogError("Error: Unable to create PlayerActionSet of type " + m_BindingsType);
                    return;
                }

                if (!(value is IBindings)) {
                    Debug.LogError("Error: PlayerActionSet does not implement IBindings.");
                    return;
                }

                m_Bindings = value as IBindings;
                m_Bindings.CreateBindings();
            }
        }
 
Top