I searched for this and it didn’t help i need to know AddDynamic() what is this thing do
Not a function, it’s a macro usually used to bind a function to an event:
// Helper macro for calling AddDynamic() on dynamic multi-cast delegates. Automatically generates the function name string.
#define AddDynamic( UserObject, FuncName ) __Internal_AddDynamic( UserObject, FuncName, STATIC_FUNCTION_FNAME( TEXT( #FuncName ) ) )
Its a way to functions to an object called a delegate. When the delegate is broadcast, all bound functions will be called. I prefer to call AddUniqueDynamic() on my delegates, and this often done in the constructor method in C++.
Official documentation pages:
My own write up:
Section 2 under macros.
4 Likes