https://github.com/ostanton/macrosystem
Runtime Unreal Engine macro system
https://github.com/ostanton/macrosystem
plugin ue5 ue5-plugin unreal-engine unreal-engine-5
Last synced: about 1 month ago
JSON representation
Runtime Unreal Engine macro system
- Host: GitHub
- URL: https://github.com/ostanton/macrosystem
- Owner: ostanton
- License: mit
- Created: 2025-02-21T18:48:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-26T12:00:32.000Z (over 1 year ago)
- Last Synced: 2025-04-26T13:19:27.392Z (over 1 year ago)
- Topics: plugin, ue5, ue5-plugin, unreal-engine, unreal-engine-5
- Language: C++
- Homepage:
- Size: 225 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unreal Engine Macro System
This is very unstable and buggy, and is more a proof of concept than anything substantially useful.
It's built on UE5.2, and uses Slate heavily (only the macro editor is exposed as a `UWidget`).
There's little documentation, but more will come as I flesh it out. Feel free to use or extend this as you wish.
- [How to setup](#how-to-setup)
- [Creating custom macros](#creating-custom-macros)
- [Screenshots](#screenshots)
## How to setup
1. Download or clone the repository,
2. Put it in your project's plugins folder (e.g. `MyProject/Plugins/MacroSystem`),
3. Open the editor and enable it in the plugins window (`Edit > Plugins > Macro System`),
4. Restart the editor,
5. Follow [Creating custom macros](#creating-custom-macros) for how to create your own macros.
## Creating custom macros
Macros are just `UObject`s, so you can inherit from the base `UMacro` Blueprint class to create your own.
Fill out the class defaults, and override `ExecuteCustomParameters`, which is where the magic happens.
In this event, you can do whatever you want, as macros have a valid world reference. For example,
the built-in `Delay` macro sets a timer for the user-specified length of time before finishing.
After you do whatever you wanted to do, call `FinishExecute` to finish the macro.
The `bSuccess` pin is purely to indicate to *conditional macros* (like if statements and while loops)
whether to run their actions, or skip them. If you don't intend on your macro being used in a conditional macro,
then don't worry about the value of `bSuccess`. You can just leave it as true.
>Control is handed over completely to the macro, so make sure all your code paths finish correctly!
In order to use your macro at runtime, you need to add it to the macro settings in a category. Go to
`Project Settings > Engine > Macro Settings` and add a category for your macros. Give it a unique key,
and add your macro to it. It will now show up in the context menu when adding an action to a user macro.
>The built-in macros (like If, While, For, Delay, etc.) are not added in the settings by default.
>I still need to work out how to do that.
## Screenshots


