Navigation
API > API/Runtime > API/Runtime/Engine
The Field Notification system allows a user to know when a property value is modified at runtime (note that it can be a function return value). The class needs to implement the INotifyFieldValueChanged interface. The property' setter usually follows this pattern "if (new value != old value) assign the new value; broadcast that the value changed;". The Blueprint implementation handles that setter logic automatically with SetPropertyValueAndBroadcast. When a property value is modified by replication, the RepNotify will call BroadcastFieldValueChanged. A function can also be a Field Notify. The function needs to be const and return a single value.
| Name | UFieldNotificationLibrary |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/FieldNotification/FieldNotificationLibrary.h |
| Include Path | #include "FieldNotification/FieldNotificationLibrary.h" |
Syntax
UCLASS (MinimalAPI)
class UFieldNotificationLibrary : public UBlueprintFunctionLibrary
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBlueprintFunctionLibrary → UFieldNotificationLibrary
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void BroadcastFieldsValueChanged
(
UObject* Object, |
Broadcast that a list of Field values changed. | FieldNotification/FieldNotificationLibrary.h |
|
static void BroadcastFieldValueChanged
(
UObject* Object, |
Broadcast that the Field value changed. | FieldNotification/FieldNotificationLibrary.h |
|
| FieldNotification/FieldNotificationLibrary.h |
|
||
static bool SetPropertyValueAndBroadcastFields
(
bool NewValueByRef, |
FieldNotification/FieldNotificationLibrary.h |
|