UFunctions use a specialized syntax that allows additional information about the function to be specified in the declaration through the use of Function Specifiers.
C++ functions are declared using the standard C++ syntax for declaring a function.
UFunctions behave the same as C++ functions in that they have a C++ implementation, can be called from within C++ code, and can contain calls to other C++ functions or UFunctions within their function bodies. UFunctions differ in a few areas, however. For instance, they can be called or overridden from within the Blueprint Visual Scripting system. Any UFunction declared using the BlueprintCallable, BlueprintImplementableEvent, or BlueprintPure specifiers will be exposed to Blueprints.
UFunctions are also used as replication callbacks; meaning the UFunction will be called when the variable it is associated with changes and is replicated across the network.
*UFunctions can also be assigned as delegates within the default properties of a class. This technique is commonly used to bind input actions to functions in Input classes.
*UFunctions are also the only type of function that can be declared as an exec function allowing them to be called by the player from the in-game console during play.
*UFunctions are also the only type of function that can be declared as an exec function allowing them to be called by the player from the in-game console during play.
No comments :
Post a Comment