Assigning Sticks from code

Hi,

I am trying to make my input configurable via variables in the Unity inspector.

For example I am doing:

public Key fireKey = Key.A;
public GamepadButton fireButton = GamepadButton.A;

Now I also want to create a variable where I can assign left or right Stick for the input, but am struggling to do so. Basically what I want to write, in analogy, is:

public Stick walkStick = Stick.Left;

But there is no such thing.

What is the equivalent syntax?

(PS: I know there are other ways to do this through Events etc but I am looking for this exact solution.)

Doesn’t look like there is any real way to do so. You could simply introduce your own enum and some utility methods to make this distinction.

Mind you I’ve always just use the InputActionReference objects to assign inputs via the inspector.