I am currently working on creating a c++ based system for rebinding my keys ar runtime.
I am able to do it using Blueprints, but my project lead has mandated that it is done using c++ in order to make it easy to expand on and in order to avoid the kind of nightmarish blueprints we would end up with.
The general issue I have is that the majority of c++ resources I have been able to find appear to be either outdated, extremely difficult to interpret or lacking crucial information.
I should also mention that I am still learning c++ and have not quite been able to wrap my head around it yet.
With this established, here are the problems I am having.
In my c++ file, I want to be able to access the Key Input Selectors in my UI widget and recieve the input from them. The problem is that I cant seem to define them in the h file. I have tried a few variations, but UE always throws an error when I attempt to compile it and I have thus far been unable to find a example to replicate.
UPROPERTY(BlueprintReadWrite, meta = (BindWidget)) UInputKeySelector* pInputKeySelector_FireWeapon;
Here is one of of the ways I tried to implement it based on how I have done similair things previously (the IKS in the widget is called pInputKeySelector_FireWeapon).
Secondly, I have a hard time coming to terms with the syntax of the commands I would need to use in order to actually change the binding. Based on advice I have recieved elsewhere I attempted to implement the command AddActionMapping, but I have trouble understanding how I would actually implement it, meaning that I do not understand which arguments I need to pass into it and how to formulate them, aswell as how to pass the input from the IKS into it.
What I really need are concreate examples of up to date code as well as help understanding said code.
Any help would be appreciated, Thank You.