Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

unreal engine c++ bind action to function with parameter

DECLARE_DELEGATE_OneParam(FCustomInputDelegate, const bool);
InputComponent->BindAction<FCustomInputDelegate>("OnSomeInput", IE_Pressed, this, &AMyActor::OnInput, true);

DECLARE_DELEGATE_TwoParams(FAnotherCustomInputDelegate, const bool, const float);
InputComponent->BindAction<FAnotherCustomInputDelegate>("OnSomeOtherInput", IE_Pressed, this, &AMyActor::OnOtherInput, true, 10.f);
Source by forums.unrealengine.com #
 
PREVIOUS NEXT
Tagged: #unreal #engine #bind #action #function #parameter
ADD COMMENT
Topic
Name
5+8 =