Skip to content

Commit 96acf96

Browse files
committed
update README
1 parent 34fabfc commit 96acf96

2 files changed

Lines changed: 108 additions & 112 deletions

File tree

README.md

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
**English** | [Русский](README.ru.md)
44

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`.
66

77
![Hero Banner](screenshots/hero_banner.png)
88

99
## Overview
1010

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.
1212

1313
**Key features:**
14-
- Serializable `FFunctionHandler` struct — works with SaveGame, replication, data assets
14+
- Serializable `FFunctionHandler` struct. Works with SaveGame, replication, data assets
1515
- Full property editors in Details panel (GameplayTag pickers, asset selectors, color pickers, etc.)
1616
- Custom K2 Nodes: **Execute Handler**, **Make Handler**, **Set/Get Handler Parameters**
1717
- 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
2020

2121
## Installation
2222

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.
2624

2725
**Modules:**
2826

@@ -34,7 +32,7 @@ A serializable, data-driven function call system for Unreal Engine 5. Configure
3432

3533
## Quick Start
3634

37-
### Blueprint Variable Workflow
35+
### Blueprint: Variable Workflow
3836

3937
1. Add a `FFunctionHandler` variable to your Blueprint
4038
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
4341

4442
![Variable Workflow](screenshots/variable_workflow.png)
4543

46-
### Blueprint Make Handler Workflow
44+
### Blueprint: Make Handler Workflow
4745

4846
1. Place a **Make Function Handler** node
4947
2. Select Target Class in node details, pick a function from the dropdown
@@ -52,17 +50,17 @@ A serializable, data-driven function call system for Unreal Engine 5. Configure
5250

5351
![Make Handler Workflow](screenshots/make_handler_workflow.png)
5452

55-
### Blueprint Set / Get Handler Parameters
53+
### Blueprint: Set / Get Handler Parameters
5654

57-
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.
5856

5957
![Batch Set Get](screenshots/batch_set_get.png)
6058

61-
### Blueprint Set Single Parameter
59+
### Blueprint: Set Single Parameter
6260

6361
1. Place a **Set Handler Parameter** node
6462
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
6664

6765
![Set Parameter Node](screenshots/set_parameter_node.png)
6866

@@ -91,7 +89,7 @@ The property customization provides a complete editing experience:
9189
9290
- **Target Class** picker with standard class selector
9391
- **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
9593
- Hidden parameters (return value, pure out) are automatically filtered
9694
9795
![Details Panel](screenshots/details_panel.png)
@@ -120,7 +118,7 @@ Creates a `FFunctionHandler` struct inline with typed input pins for each functi
120118
121119
### Set Handler Parameters
122120
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.
124122
125123
**Features:**
126124
- 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.
151149
FFunctionHandler (USTRUCT)
152150
├── TargetClass: TSubclassOf<UObject>
153151
├── FunctionName: FName
154-
├── ParameterValues: TMap<FName, FString> ExportText/ImportText serialization
155-
├── ResolveFunction(UObject*) UFunction*
156-
└── ResolveFunctionFromClass() UFunction*
152+
├── ParameterValues: TMap<FName, FString> // ExportText/ImportText serialization
153+
├── ResolveFunction(UObject*) -> UFunction*
154+
└── ResolveFunctionFromClass() -> UFunction*
157155

158156
UFunctionHandlerLibrary (UCLASS)
159-
├── ExecuteFunctionByHandler() Simple fire-and-forget
160-
├── SetParameter<T>() C++ template setter
161-
├── InternalExecuteWithResult() Returns UFunctionCallResult*
162-
├── GetResultByName() CustomThunk, typed output
163-
├── InternalSetParameter() CustomThunk, typed input
164-
├── InternalGetParameter() CustomThunk, typed output from TMap
165-
└── InternalMakeFunctionHandler() Struct construction
157+
├── ExecuteFunctionByHandler() // Simple fire-and-forget
158+
├── SetParameter<T>() // C++ template setter
159+
├── InternalExecuteWithResult() // Returns UFunctionCallResult*
160+
├── GetResultByName() // CustomThunk, typed output
161+
├── InternalSetParameter() // CustomThunk, typed input
162+
├── InternalGetParameter() // CustomThunk, typed output from TMap
163+
└── InternalMakeFunctionHandler() // Struct construction
166164

167165
UFunctionCallResult (UCLASS, Transient)
168-
├── ResultData: TSharedPtr<FStructOnScope> Owns the parameter buffer
166+
├── ResultData: TSharedPtr<FStructOnScope> // Owns the parameter buffer
169167
├── CachedFunction: TWeakObjectPtr<UFunction>
170-
└── GetBuffer() uint8*
168+
└── GetBuffer() -> uint8*
171169
```
172170
173171
### How It Works
174172
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>`.
176174
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.
178176
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.
180178
181179
### CustomThunk Implementation
182180
183181
The plugin uses UE's Blueprint VM `CustomThunk` mechanism for type-safe wildcard parameters:
184182
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`
188186
189187
All follow the engine's `StepCompiledIn<FProperty>` pattern with explicit `MostRecentProperty` reset to avoid stale VM state.
190188

0 commit comments

Comments
 (0)