March 2019
Intermediate to advanced
708 pages
17h 9m
English
Pointers are great since we are able to assign them at runtime and can change where in memory they are pointing to. In addition to standard types, we can also create pointers to functions as well, but these raw function pointers are unsafe to use for a number of reasons. Delegates are a much safer version of function pointers that gives us the flexibility to call a function without knowing which function is assigned until the moment it is called. This flexibility is one of the main reasons to prefer delegates over static functions. This recipe shows you how to associate a UFUNCTION to a delegate so that it will be called when the delegate is executed.
Read now
Unlock full access