Editor Customization
The Texturge editor achieves deep customization through IDetailCustomization, IPropertyTypeCustomization, FKismetCompilerContext extensions, and templated parameter helpers.
FAnimatedTextBlockDetails
Provides a custom Details panel for the UAnimatedTextBlock widget (IDetailCustomization).
class FAnimatedTextBlockDetails : public IDetailCustomization
{
static TSharedRef<IDetailCustomization> MakeInstance();
void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
private:
void BuildParameterRows(IDetailCategoryBuilder& AnimCat,
IDetailLayoutBuilder& DetailBuilder,
UAnimatedTextBlock* Widget,
TSharedPtr<IPropertyHandle> OverridesHandle);
void SaveAllCDODefaults(UTextAnimInstance* CDO);
UTextAnimInstance* GetTargetCDO() const;
static bool IsUserParameter(FProperty* Prop);
TWeakObjectPtr<UAnimatedTextBlock> TargetWidget;
TMap<FName, TArray<uint8>> CDODefaultsForReset;
};
Parameter Row Generation Mechanism
- Attach
UAnimParameterOverrides’s 6 override maps into the Details panel as external object properties viaAddExternalObjectProperty - Enumerate all properties on the
UTextAnimInstanceCDO generated by the associatedUTextAnimationBlueprint, filteringIsUserParameter(CPF_BlueprintVisibleand not a system property) Blueprint variables - Generate one row per Blueprint variable: variable name + override value input + Reset button
SaveAllCDODefaultscaches CDO defaults when the panel opens; Reset removes the override entry via theAnimParamReset<UAnimParameterOverrides>template and writes back the CDO copy
NOTE
CDO copy approach: the panel edits a copy of the
UTextAnimInstanceCDO — native engine editor behavior; the Blueprint CDO is never modified. At bake timeFAnimInstanceCustomizerinjects into the bake temporary instance.
FTextAnimationInstanceDetails
Provides a custom Details panel for UTextAnimInstance (IDetailCustomization), controlling category sorting only without changing the property layout.
class FTextAnimationInstanceDetails : public IDetailCustomization
{
static TSharedRef<IDetailCustomization> MakeInstance();
void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
};
FAnimationEntryDetails
Provides custom Details for the FAnimationEntry struct (IPropertyTypeCustomization), active in the Entries array of UTextAnimationDataAsset.
class FAnimationEntryDetails : public IPropertyTypeCustomization
{
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
void CustomizeHeader(TSharedRef<IPropertyHandle> PropertyHandle,
FDetailWidgetRow& HeaderRow,
IPropertyTypeCustomizationUtils& CustomizationUtils) override;
void CustomizeChildren(TSharedRef<IPropertyHandle> PropertyHandle,
IDetailChildrenBuilder& ChildBuilder,
IPropertyTypeCustomizationUtils& CustomizationUtils) override;
private:
TMap<FName, TArray<uint8>> CDODefaults;
};
Like the widget panel, entry-level parameter overrides (6 maps) are edited through the CDO copy + Reset mechanism, reusing the TAnimParamTraits<T, FAnimationEntry> specializations underneath.
UTextAnimationTrackProxy
A proxy object (UObject) for editing track properties in the Details panel, wrapping FTextAnimationTrack as editable properties:
UCLASS(meta = (DisplayName = "文本动画轨道代理"))
class UTextAnimationTrackProxy : public UObject
{
UPROPERTY(EditAnywhere, Category = "轨道", meta = (DisplayName = "轨道属性"))
FTextAnimationTrack Track;
};
FTextAnimationBlueprintCompilerContext
Kismet compiler extension responsible for compiling UTextAnimationBlueprint into UTextAnimationBlueprintGeneratedClass.
class FTextAnimationBlueprintCompilerContext : public FKismetCompilerContext
{
// FKismetCompilerContext overrides
virtual void SpawnNewClass(const FString& NewClassName) override;
virtual void CleanAndSanitizeClass(UBlueprintGeneratedClass* ClassToClean, UObject*& InOutOldCDO) override;
virtual void EnsureProperGeneratedClass(UClass*& InOutTargetClass) override;
virtual void CreateClassVariablesFromBlueprint() override;
virtual void CreateFunctionList() override;
virtual void FinishCompilingClass(UClass* Class) override;
virtual bool ValidateGeneratedClass(UBlueprintGeneratedClass* Class) override;
virtual void PreCompile() override;
private:
void ValidateTrackData(); // track data integrity validation (5 rules)
FGuid FixupVariableGUIDs(UTextAnimationBlueprint*, const FName&);
void CopyAssetDataToClass(UTextAnimationBlueprintGeneratedClass* OutClass);
};
Compilation Pipeline
| Step | Override | Behavior |
|---|---|---|
| 1 | PreCompile | pre-compile preparation |
| 2 | CreateClassVariablesFromBlueprint | ensures variable injection before base class scanning (2026-07 refactor fix: variable injection moved before the base class call) |
| 3 | FixupVariableGUIDs | maintains stable GUIDs for Blueprint variables (looks up VariableNameToGuidMap; if not found, generates a deterministic GUID from the path name and writes it back) |
| 4 | ValidateTrackData | validates Tracks array integrity (5 rules) |
| 5 | FinishCompilingClass | CopyAssetDataToClass copies asset data such as Tracks, computing CompiledTotalDuration = max(StartTime + Duration) |
| 6 | CompileCount | increments on every compile, participates in the Blueprint fingerprint hash, guaranteeing cache invalidation after compilation |
Compile output is written into UTextAnimationBlueprintGeneratedClass (CompiledTracks / CompiledFrameRate / CompiledTotalDuration / CompiledCharacterInterval).
Templated Parameter Helpers
AnimParamTraitsHelpers.h (Editor module, header-only) provides 3 shared template functions:
| Template | Description |
|---|---|
AnimParamNeedsReset<Owner>(Ovr, PropName, EAnimParamType, DefVal) | determines whether the current override value deviates from the CDO default (decides the Reset button display) |
AnimParamReset<Owner>(Ovr, CDOCopy, PropName, Prop, EAnimParamType, DefVal) | removes the override entry and restores the CDO copy default |
AnimParamSync<Owner>(Ovr, CDOCopy, PropName, EAnimParamType) | syncs CDO copy property values into the override map |
The underlying mapping comes from the runtime module’s TAnimParamTraits<T, Owner> specializations (DECLARE_ANIM_PARAM_TRAIT in AnimatedTextBlock.h and DECLARE_ENTRY_TRAIT in AnimationEntry.h).
Extending Custom Details Panels
The plugin supports registering external custom Details panels:
- Create a class inheriting
IDetailCustomizationand implementCustomizeDetails(IDetailLayoutBuilder&) - Register in the module’s
StartupModule():
FPropertyEditorModule& PropertyModule =
FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyModule.RegisterCustomClassLayout(
UYourClass::StaticClass()->GetFName(),
FOnGetDetailCustomizationInstance::CreateStatic(&FYourDetails::MakeInstance));
- Call
UnregisterCustomClassLayoutinShutdownModule()to unregister
All built-in Details customizations bind through the same mechanism, ensuring standardization with the engine’s Details panel.