Blueprint Macro and Function libraries
Sometimes, in a project, you identify a macro or function that can be used in several Blueprints. The Unreal Editor allows you to create a Blueprint Macro Library to gather the macros that you want to share between all Blueprints. In the same way, you can create a Blueprint Function Library to share utility functions between all Blueprints.
The menu options to create Blueprint Function Library and Blueprint Macro Library are in the Blueprints submenu that appears when creating an asset:
When creating a Blueprint Macro Library, you need to choose a Parent class. The macros of the library will have access to variables and functions of the Parent class selected, but the Macro Library can only be used by subclasses of the chosen Parent class. Selecting the Actor class will be the best option in most cases.
Let's create a Blueprint...