Great job haruhito_o!
After adding component, Details window will not update. But you can use UpdateEditorWindow function/node.
UFUNCTION(BlueprintCallable)
static void UpdateEditorWindow(AActor* TargetActor)
{
// Deselect the actor
GEditor->SelectActor(TargetActor, false, true);
// Reselect the actor
GEditor->SelectActor(TargetActor, true, true);
// Notify the editor that the selection changed (this can force a details panel refresh)
GEditor->NoteSelectionChange();
}
but remember to add include “Editor.h”
and update your Build.cs file with “UnrealEd”
PublicDependencyModuleNames.AddRange(new string { Your modules, “UnrealEd” });