Hello!
I am creating an editor-only plugin where I do some struct customization stuff. In my module.cpp file I am able to register custom property layout using
FPropertyEditorModule::RegisterCustomPropertyTypeLayout()
This works great but in other class I that I’ve created I am trying to use
const FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(TEXT("PropertyEditor"));
const FCustomPropertyTypeLayoutMap Map;
const bool bIsCustomized = PropertyModule.IsCustomizedStruct(nullptr, Map);
function and doing that creates linker error such as: Error LNK2019 : unresolved external symbol "public: bool __cdecl FPropertyEditorModule::IsCustomizedStruct…
I have PropertyEditorModule.h include in that class aaand I’ve tried adding private folder of FPropertyEditorModule to PrivateIncludePaths in my build.cs file from the plugin with:
PrivateIncludePaths.Add(Path.GetFullPath(Target.RelativeEnginePath) + "/Source/Editor/PropertyEditor");
but the result is the same.
From what I understand, the runtime linking against virtual functions (like RegisterCustomPropertyTypeLayout()) works fine but for some reason it cannot link it non-virtual functions (like IsCustomizedStruct()) at compile time.
Why is that? Can I do something about it?
Or maybe is there some other way to check if a given UStruct has customized property layout?
Since I’d like to share this plugin on the marketplace later I’d prefer not having to modify the engine for it to work
Thanks in advance!