player input action/axes names to properties autogeneration and autoexposion

Hello.

Current state:
Now you need to define action names by hand in over 3 places: editor/ini, cpp input binding, umg input events

It would be usefull if UHT will parse project file DefaultInput.ini and collects all action and axes mapping names you added there from editor or code enviroment and export this list then to some autogenerated file with static properties or constants, so you can use them in cpp or blueprints.

example:
you add in editor new input action “USE” and assign "E "key to it
it saves it to DefaultInput.ini


+ActionMappings=(ActionName="USE",Key=E,bShift=False,bCtrl=False,bAlt=False,bCmd=False)

when you run project building it parses DefaultInput.ini and collects “USE” as ActionName (similar to UInputSettings::GetActionNames() does at runtime)
then it adds new property const or static to a class in some autogenerated file with name: “InputAction_USE” and marks it to be exposed for blueprint

then you can simply use it in cpp in SetupInputComponent() like


InputComponent->BindAction(InputAction_USE, IE_Pressed, this, &AClass::function);

then you can simply get and use it in blueprint where it required, for example in “ListenForInputAction” node
12wfsdq34.png

So, what it does for developer:

  1. you define input name in one single place
  2. then you can simply use constant names placed to variables everywhere
  3. you will not do any mistake when writing action name by hand anywhere