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();
}