๐ Property Path Helper
Short Description
Helpers for robust property path handling and matching across generated struct names.
Long Description
GorgeousPropertyPath utilities help when working with dotted property paths and UE-generated struct suffixes. They provide canonicalization, matching semantics that ignore generated suffixes, and helpers to resolve FProperty pointers by a path segment.
๐ Features
- Strip UE-generated struct suffixes from names.
- Find properties by authored name or canonical segment.
- Compare dotted property paths with generated suffix tolerance.
StripGeneratedStructSuffix
Removes UE-generated suffix patterns (e.g., _1234_abcdef...) from struct or property names to recover a stable base identifier.
| Parameter Name | Type | Description |
|---|---|---|
Name |
FString |
The name to canonicalize. |
FString Base = GorgeousPropertyPath::StripGeneratedStructSuffix(TEXT("MyStruct_0_abcdef0123456789abcdef0123456789"));
GetPreferredPropertySegment
Returns the best human-authored segment for a property (prefers GetAuthoredName() and falls back to the internal name), then strips generated suffixes.
| Parameter Name | Type | Description |
|---|---|---|
Property |
const FProperty* |
Property pointer to inspect. |
FString Segment = GorgeousPropertyPath::GetPreferredPropertySegment(SomeProperty);
DoesPropertySegmentMatch
Compares a property against a path segment, taking generated suffixes and authored names into account for robust matching.
| Parameter Name | Type | Description |
|---|---|---|
Property |
const FProperty* |
Property to compare. |
Segment |
FString |
Path segment to match. |
bool bMatch = GorgeousPropertyPath::DoesPropertySegmentMatch(SomeProperty, TEXT("myField"));
FindConstPropertyBySegment / FindPropertyBySegment
Searches a UStruct for a property matching the supplied segment using the tolerant matching rules above. Returns const FProperty* or FProperty* respectively.
| Parameter Name | Type | Description |
|---|---|---|
CurrentStruct |
UStruct* |
Struct to search in. |
Segment |
FString |
Path segment to locate. |
const FProperty* Found = GorgeousPropertyPath::FindConstPropertyBySegment(SomeStruct, TEXT("Items"));
ArePathStringsEquivalent
Compares two dotted paths segment-by-segment using canonicalized segments (generated suffixes stripped) and case-insensitive comparison.
| Parameter Name | Type | Description |
|---|---|---|
LeftPath |
FString |
First dotted path. |
RightPath |
FString |
Second dotted path. |
bool bEqual = GorgeousPropertyPath::ArePathStringsEquivalent(TEXT("Item.0.Value"), TEXT("Item.0.Value"));