You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-32Lines changed: 30 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@
2
2
3
3
**English** | [Русский](README.ru.md)
4
4
5
-
A serializable, data-driven function call system for Unreal Engine 5. Configure function calls in the editor with full parameter editing — execute them at runtime via `ProcessEvent`.
5
+
A serializable, data-driven function call system for Unreal Engine 5. Configure function calls in the editor with full parameter editing, execute them at runtime via `ProcessEvent`.
6
6
7
7

8
8
9
9
## Overview
10
10
11
-
**FunctionHandler** wraps a `UFunction` reference with stored parameter values into a single, serializable struct (`FFunctionHandler`). Instead of hardcoding function calls or wiring dozens of Blueprint nodes, you define *what* to call and *with what parameters* as data — then execute it whenever and wherever you need.
11
+
**FunctionHandler** wraps a `UFunction` reference with stored parameter values into a single, serializable struct (`FFunctionHandler`). Instead of hardcoding function calls or wiring dozens of Blueprint nodes, you define *what* to call and *with what parameters* as data, then execute it whenever and wherever you need.
12
12
13
13
**Key features:**
14
-
- Serializable `FFunctionHandler` struct — works with SaveGame, replication, data assets
14
+
- Serializable `FFunctionHandler` struct. Works with SaveGame, replication, data assets
15
15
- Full property editors in Details panel (GameplayTag pickers, asset selectors, color pickers, etc.)
- Typed return value / out parameter support via custom Blueprint VM thunks
@@ -20,9 +20,7 @@ A serializable, data-driven function call system for Unreal Engine 5. Configure
20
20
21
21
## Installation
22
22
23
-
1. Clone or download into your project's `Plugins/` directory
24
-
2. Regenerate project files
25
-
3. Enable the plugin in `.uproject` or via Edit → Plugins
23
+
Download the pre-built plugin for UE 5.6 from [Releases](https://github.com/PsinaDev/FunctionHandler/releases/) or clone/download the source code. Place the plugin into your project's `Plugins/` directory, regenerate project files, and enable the plugin in `.uproject` or via Edit > Plugins.
26
24
27
25
**Modules:**
28
26
@@ -34,7 +32,7 @@ A serializable, data-driven function call system for Unreal Engine 5. Configure
34
32
35
33
## Quick Start
36
34
37
-
### Blueprint — Variable Workflow
35
+
### Blueprint: Variable Workflow
38
36
39
37
1. Add a `FFunctionHandler` variable to your Blueprint
40
38
2. In the Details panel, select **Target Class** and **Function**
@@ -43,7 +41,7 @@ A serializable, data-driven function call system for Unreal Engine 5. Configure
Use **Set Handler Parameters** to batch-write all parameter values on an existing handler, and **Get Handler Parameters** to batch-read them back — both with fully typed pins.
55
+
Use **Set Handler Parameters** to batch-write all parameter values on an existing handler, and **Get Handler Parameters** to batch-read them back. Both with fully typed pins.
58
56
59
57

60
58
61
-
### Blueprint — Set Single Parameter
59
+
### Blueprint: Set Single Parameter
62
60
63
61
1. Place a **Set Handler Parameter** node
64
62
2. Connect a Handler variable or Make node
65
-
3. Select parameter from the dropdown — Value pin automatically resolves to the correct type
63
+
3. Select parameter from the dropdown. Value pin automatically resolves to the correct type
@@ -91,7 +89,7 @@ The property customization provides a complete editing experience:
91
89
92
90
- **Target Class** picker with standard class selector
93
91
- **Function** dropdown with search (filters delegates, internal functions)
94
-
- **Parameter editors** — native UE property widgets for every parameter type
92
+
- **Parameter editors** with native UE property widgets for every parameter type
95
93
- Hidden parameters (return value, pure out) are automatically filtered
96
94
97
95

@@ -120,7 +118,7 @@ Creates a `FFunctionHandler` struct inline with typed input pins for each functi
120
118
121
119
### Set Handler Parameters
122
120
123
-
Batch-writes all parameter values on an existing handler with typed input pins. Resolves function signature from the connected handler — generates one input pin per parameter.
121
+
Batch-writes all parameter values on an existing handler with typed input pins. Resolves function signature from the connected handler, generates one input pin per parameter.
124
122
125
123
**Features:**
126
124
- Typed input pins for every function parameter
@@ -151,40 +149,40 @@ Sets a single parameter on an existing handler with a type-safe value pin.
├── InternalGetParameter() // CustomThunk, typed output from TMap
163
+
└── InternalMakeFunctionHandler() // Struct construction
166
164
167
165
UFunctionCallResult (UCLASS, Transient)
168
-
├── ResultData: TSharedPtr<FStructOnScope> ← Owns the parameter buffer
166
+
├── ResultData: TSharedPtr<FStructOnScope> // Owns the parameter buffer
169
167
├── CachedFunction: TWeakObjectPtr<UFunction>
170
-
└── GetBuffer() → uint8*
168
+
└── GetBuffer() -> uint8*
171
169
```
172
170
173
171
### How It Works
174
172
175
-
1. **Editor time:** Property customization creates `FStructOnScope(UFunction*)`, imports stored values, displays via `IStructureDetailsView`. Changes export back to `TMap<FName, FString>`.
173
+
1. **In the editor:** Property customization creates `FStructOnScope(UFunction*)`, imports stored values, and displays them via `IStructureDetailsView`. Changes export back to `TMap<FName, FString>`.
176
174
177
-
2. **Compile time:** K2 Nodes expand into chains of `InternalMakeFunctionHandler` → `InternalSetParameter` → `InternalExecuteWithResult` → `GetResultByName` calls. CustomThunks use `FProperty::ExportTextItem_Direct` / `ImportText_Direct` for type-safe conversion.
175
+
2. **At compile time:** K2 Nodes expand into chains of `InternalMakeFunctionHandler` > `InternalSetParameter` > `InternalExecuteWithResult` > `GetResultByName` calls. CustomThunks use `FProperty::ExportTextItem_Direct` / `ImportText_Direct` for type-safe conversion.
178
176
179
-
3. **Runtime:** `ExecuteFunctionByHandler` allocates a parameter frame (`FMemory::Malloc` + `InitializeStruct`), imports values from TMap via `ImportText_Direct`, calls `ProcessEvent`, cleans up.
177
+
3. **At runtime:** `ExecuteFunctionByHandler` allocates a parameter frame (`FMemory::Malloc` + `InitializeStruct`), imports values from TMap via `ImportText_Direct`, calls `ProcessEvent`, and cleans up.
180
178
181
179
### CustomThunk Implementation
182
180
183
181
The plugin uses UE's Blueprint VM `CustomThunk` mechanism for type-safe wildcard parameters:
184
182
185
-
- **`GetResultByName`** — Reads from `UFunctionCallResult` buffer using `FProperty::CopySingleValue`
186
-
- **`InternalSetParameter`** — Exports typed value via `FProperty::ExportTextItem_Direct` into the handler's TMap
187
-
- **`InternalGetParameter`** — Imports stored text from the handler's TMap back into a typed output via `FProperty::ImportText_Direct`
183
+
- **`GetResultByName`** reads from `UFunctionCallResult` buffer using `FProperty::CopySingleValue`
184
+
- **`InternalSetParameter`** exports typed value via `FProperty::ExportTextItem_Direct` into the handler's TMap
185
+
- **`InternalGetParameter`** imports stored text from the handler's TMap back into a typed output via `FProperty::ImportText_Direct`
188
186
189
187
All follow the engine's `StepCompiledIn<FProperty>` pattern with explicit `MostRecentProperty` reset to avoid stale VM state.
0 commit comments