FText::PreloadStringTable
#include "Internationalization/Text.h"
Access: public
Specifiers: static
Description
Requests that the given string table entry be loaded into memory before it is needed, avoiding a hitch when the text is first displayed.
Caveats & Gotchas
- • This is a hint — the engine may defer or ignore it during certain load states (e.g. before the asset manager is ready). It does not guarantee synchronous availability; use it to prime the cache ahead of time, not as a blocking load.
- • String table assets referenced this way still need to be in the cook for the build. PreloadStringTable does not add dependencies to the asset registry — ensure the table is referenced by a primary asset or explicitly included in the cook rules.
Signature
static CORE_API void PreloadStringTable( FName InTableId, const FTextKey& InKey ) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InTableId | FName | The FName identifier of the string table asset to preload. | — |
| InKey | const FTextKey& | The specific key within the table to ensure is resident. | — |
Return Type
void Example
Preload a string table entry before a UI screen opens C++
// Called when the player opens the inventory menu
void UInventoryScreen::NativePreConstruct()
{
Super::NativePreConstruct();
FText::PreloadStringTable(
FName(TEXT("/Game/UI/ST_Inventory")),
FTextKey(TEXT("ItemNameHeader")));
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?