I created an editor script that allows me to modify the tooltip of the variables in the blueprint.

object=UEditorUtilityLibrary::GetSelectedAssets()[0];
UBlueprint *blueprint=Cast(object);
UClass wang=UBlueprintEditorLibrary::GeneratedClass(blueprint);
if (wang)
{
for (TFieldIterator proint(wang); proint; ++proint)
{
FProperty
property=*proint;

		if (property->GetName()=="QW")
		{
			
			
			FString wangq= FString(L"1");
			
			**property->SetMetaData("Tooltip", TEXT("is a tool"));**
			
			blueprint->MarkPackageDirty();

image

I created an editor script that allows me to modify the tooltip of the variables in the blueprint. However, when I run it, I can display the corrected tooltip in the default values of the blueprint class by hovering over the variables. But when I compile or run the game, the tooltip returns to its previous state and cannot be persisted.

Try marking the blueprint as dirty so that your changes are preserved and the class is compiled with the changes.

I have already run it,blueprint->MarkPackageDirty(); But as long as you click compile in the blueprint, TOOLTIP will return to its previous state

How to achieve persistent storage

This is very strange, I used UClass::FindPropertyByName and Set/GetMetaData and I don’t see any changes in the blueprint at all.
Although if display the log before and after - the tooltip (description) is displayed correctly. :unamused:

How great that Widget Reflector exists! :star_struck:
I found a function that is called when you change the description in the Details tab. You need to use FBlueprintEditorUtils::SetBlueprintVariableMetaData