There are some key differences that will become more apparent as you get into more advanced use cases.
Functions are actually called when you place nodes to call the function. That means you can target them (i.e. "call a function on another object"), and they allow for communication between Blueprints.
Macros take the nodes from the macro graph, and actually replace the macro node with a copy of all those nodes. Basically, when the Blueprint is compiled, the macro copies all the
graph nodes, and pastes them in where the macro node is.
If you want to change selection, open document below and click on "Move attachment"
Blueprint Best Practices | Unreal Engine Documentationlocal variables. Macros use "anonymous" local variables, which don't have a specific name, but just hold a value. Both are awesome ways to encapsulate functionality for reusability and clarity. <span>There are some key differences that will become more apparent as you get into more advanced use cases. Functions are actually called when you place nodes to call the function. That means you can target them (i.e. "call a function on another object"), and they allow for communication between Blueprints. Macros take the nodes from the macro graph, and actually replace the macro node with a copy of all those nodes. Basically, when the Blueprint is compiled, the macro copies all the graph nodes, and pastes them in where the macro node is. Because of how they work under the hood, that means there are a few differences in what you can do: Macros can use any node for the class they're scoped to (the class you pick when you Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details