error C2510 and C2664

I’m working on this course Epic Developer Community
to create a plugin to eddit a new asset type.
The course code is there : GitHub - ue4plugins/TextAsset: Unreal Engine 4 plug-in that adds a text asset and editor for personal notes.
My code is exactly the same except for two things : I modified naming because my asset is not a text asset. I called it UHUGPerimeter
I want tot load the editing UI from an UEditorUtilityWidget

So this is the construct method in my SCompoundWidget where I have those two errors :

and



void SHUGPerimeterEditor::Construct(const FArguments& InArgs, UHUGPerimeter* InHUGPerimeter, const TSharedRef<ISlateStyle>& InStyle)
{
HUGPerimeter = InHUGPerimeter;

auto Settings = GetDefault<UHUGPerimeterEditorSettings>();

// UObjectLibrary::LoadBlueprintsFromPaths("/Content/HUGPerimeterEditorLayout.uasset");//EditorUtilityWidgetBlueprint'/GeoDiagrams/HUGPerimeterEditorLayout.HUGPerimeterEditorLayout'

UEditorUtilityWidget TabWidget;
static ConstructorHelpers::FClassFinder<UEditorUtilityWidget> BPClassFinder(TEXT("/Plugins/GeoDiagrams/Content/HUGPerimeterEditorLayout"));
TSubclassOf<UEditorUtilityWidget> BPClass = BPClassFinder.Class;

if (BPClassFinder.Class != nullptr)
{
TabWidget = SNew(BPClass, HUGPerimeter);
}


ChildSlot

SNew(SVerticalBox)

+ SVerticalBox::Slot()
.FillHeight(1.0f)

SAssignNew(EditorUtilityWidget, BPClass) // error C2510: : BPClass left of '::' must be a class/struct/union
]
];

FCoreUObjectDelegates::OnObjectPropertyChanged.AddSP(this, &SHUGPerimeterEditor::HandleHUGPerimeterPropertyChanged); //  error C2664: 'FDelegateHandle TMulticastDelegate<void (UObject *,FPropertyChangedEvent &),FDefaultDelegateUserPolicy>::AddSP<SHUGPerimeterEditor,>(const UserClass *,void (__cdecl SHUGPerimeterEditor::* )(UObject *,FPropertyChangedEvent &) const) : cannot convert argument n from 'type1' to 'type2'
}


/* STextAssetEditor callbacks
*****************************************************************************/

void SHUGPerimeterEditor::HandleHUGPerimeterPropertyChanged(const FText& NewText)
{
HUGPerimeter->MarkPackageDirty();
}

for the second error, it’s looking for the address of the function HandleHUGPerimeterPropertyChanged so make sure you have that defined and also that it matches the signature of the event I had a quick look I think it’s (UObject* InObject, FPropertyChangedEvent& InChangeEvent) and that seems to reflect the error. Also check, some of these need to be a UFUNCTION() some do not, I think this one is native and doesn’t need UFUNCTION() above it but try adding it if it still breaks.

should look something like below with maybe UFUNCTION() above it but I think not for this one.


void HandleHUGPerimeterPropertyChanged (UObject* InObject, FPropertyChangedEvent& InChangeEvent);

something like that