[UE4]Event, Delegate, Multi-cast Related

1 · 王爱国 · March 30, 2018, 10:26 a.m.
keywords:UE4, BindRaw, BindUFunction, BindUObject, Pass Arguments, Variable BindUFunction传递参数 示例1: void UMyClass::FunctionWithVar(const FString& MyVar, TFunction<void(const FString&)> InFunction) { MyLambdaHandle = OnMyDelegate.BindStatic([MyVar](TFunction<void(const FString&)> callback) {callback(MyVar);}, InFunction); // TODO: You have to track MyLambdaHandle to be able to unregister it when needed } https://answers.unrealengine.com/questions/715835/bindufunction-with-variable-capture-in-c.ht...