๐งฐ Quality-of-Life Helper Macros
Short Description
Macros that wire AutoReplication mixins, self references, and lifecycle hooks into QoL classes.
Long Description
The QoL helper macros standardize constructor wiring, BeginPlay setup, and lifecycle callbacks. They also ensure self-reference Object Variables are kept consistent across editor and runtime flows.
๐ Features
- Constructor and BeginPlay wiring helpers.
- PostLoad/PostInit property helpers for self references.
- GameMode/GameState login callbacks.
๐ Usage Examples
UE_QOL_DEFINE_CONSTRUCTOR(AGorgeousPlayerController, true);
UE_QOL_DEFINE_BEGIN_PLAY_WITH_RELAY(AGorgeousPlayerController);
UE_QOL_DEFINE_BEGIN_PLAY_WITH_RELAY
Ensures self references are valid, initializes AutoReplication data, and sets up the relay component.
| Parameter Name | Type | Description |
|---|---|---|
Class |
type | QoL class type that owns the mixin and relay. |
UE_QOL_DEFINE_BEGIN_PLAY_WITH_RELAY(AGorgeousPlayerController);
Best Practices
- Use the macros instead of repeating boilerplate in QoL classes.
- Keep macro usage in .cpp files to avoid multiple definition issues.
Troubleshooting
- If self-reference data resets on load, ensure the PostLoad macro is used.