Description
The ref-counted internal data payload of an FText, holding the localized string, format history, and generator state.
Caveats & Gotchas
- • This member is private and not part of the public API. Never access it directly outside of engine source. UE's FText is designed to be treated as an opaque value type — use the public accessor methods instead.
- • The shared ref-counting means copying an FText is cheap (pointer copy + refcount increment), but mutating operations (Format, AsNumber, etc.) always allocate a new ITextData rather than modifying in place.
Signature
TRefCountPtr<ITextData> TextData Example
Why FText copy is cheap C++
// FText copy is O(1) due to TRefCountPtr sharing
FText Original = LOCTEXT("MyKey", "Hello World");
FText Copy = Original; // no string allocation — shares TextData pointer
check(Original.ToString() == Copy.ToString()); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?