Download

How to make input events accessible in any blueprint

Hello,

I created a class inherited from UObject, and in editor created blueprint based on that class, but in the event graph I’m unable to see action and axis mappings like I am able in the Actor for example. I did some research on Input component and found out this part of code:


		
UBlueprintGeneratedClass* BGClass = Cast<UBlueprintGeneratedClass>(GetClass());
if(BGClass != NULL)
{
	UInputDelegateBinding::BindInputDelegates(BGClass, InputComponent);
}


It seemed to me like that’s what needs to be done to make inputs available in the blueprint, but unfortunately nothing happened. I debugged it and everything was fine concerning values (had valid InputComponent and BGClass wasn’t null). So I’m not sure that I’m on the right track.

Does anyone know how to make input accessible in the blueprint class that’s not inherited from Actor, Pawn, Character etc.?