FText::UnregisterTextGenerator
#include "Internationalization/Text.h"
Access: public
Specifiers: static
Description
Removes a previously registered ITextGenerator factory, preventing new instances of that type from being created during deserialization.
Caveats & Gotchas
- • Does not invalidate existing FText instances that already hold a generator of this type — they continue to function until destroyed. However, any subsequent deserialization of such FText values will fail to recreate the generator.
- • Call this in ShutdownModule() to mirror each RegisterTextGenerator call. Failing to unregister before module unload can leave a dangling function pointer in the global registry, causing a crash if a matching FText is later deserialized.
Signature
static CORE_API void UnregisterTextGenerator( FName TypeID ) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TypeID | FName | The unique identifier of the generator type to remove, matching the ID used in RegisterTextGenerator. | — |
Return Type
void Example
Unregister on module shutdown C++
void FMyModule::ShutdownModule()
{
FText::UnregisterTextGenerator(FName(TEXT("MyModule_CustomGenerator")));
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?