I’m looking to use InputComponent->BindKey to bind a templated function to a specific key. I can get this functioning fine when I use a basic type in my template such as an int32 but run into issues as soon as I try and use a UClass.
The error:
‘Cannot determine which instance of function template “APlayableCharacterController::InvokeBoundAction” is intended’
An example:
//.h
template<AActionProperties* action> void InvokeBoundAction();
//.cpp
InputComponent->BindKey(actionPair.key, IE_Pressed, this, &APlayableCharacterController::InvokeBoundAction<actionObj>);
template<AActionProperties* action> void APlayableCharacterController::InvokeBoundAction()
{
}
Any insight would be appreciated.
Thanks in advance!