Hi, I’m creating a plugin where I want to use the Graph Editor. It all works great but now I want to customize the actual nodes. I’m completely stuck at trying to create the SGraphNode object.
Here’s my code:
Header:
#include "CoreMinimal.h"
#include "EdGraph/EdGraphNode.h"
#include "EdGraph/EdGraphPin.h"
#include "SGraphNode.h"
class SDialogGraphNodeWidget : public SGraphNode
{
public:
SLATE_BEGIN_ARGS(SDialogGraphNodeWidget)
{}
SLATE_END_ARGS()
void Construct(const FArguments& inArgs, UEdGraphNode* inNode);
};
cpp:
#include "DialogGraph/DialogGraphNodeWidget.h"
void SDialogGraphNodeWidget::Construct(const FArguments& inArgs, UEdGraphNode* inNode)
{
// What do I put here?????????
}
I’m at a complete loss at what to put in the definition. All of the places I have looked suggest something like this:
Super::Construct(Super::FArguments(), inNode);
No matter what I try I get error like these:
0>SGraphPanel.h(92): Warning C4263 : 'void SGraphPanel::Construct(const SGraphPanel::FArguments &)': member function does not override any base class virtual member function
0>SGraphPanel.h(334): Warning C4264 : 'void SNodePanel::Construct(void)': no override available for virtual member function from base 'SNodePanel'; function is hidden
0>SNodePanel.h(713): Reference C4264 : see declaration of 'SNodePanel::Construct'
0>SNodePanel.h(265): Reference C4264 : see declaration of 'SNodePanel'
0>DialogGraphNodeWidget.h(18): Warning C4263 : 'void SDialogGraphNodeWidget::Construct(const SDialogGraphNodeWidget::FArguments &,UEdGraphNode *)': member function does not override any base class virtual member function
0>DialogGraphNodeWidget.h(19): Warning C4264 : 'void SPanel::Construct(void)': no override available for virtual member function from base 'SPanel'; function is hidden
0>SPanel.h(59): Reference C4264 : see declaration of 'SPanel::Construct'
0>SPanel.h(22): Reference C4264 : see declaration of 'SPanel'
[2/4] UE4Editor-DialogEditor.lib
Creating library C:\Users\Sarlack\Documents\Unreal Projects\RPGFrameworkV2\Plugins\DialogEditor\Intermediate\Build\Win64\UE4Editor\Development\DialogEditor\UE4Editor-DialogEditor.lib and object C:\Users\Sarlack\Documents\Unreal Projects\RPGFrameworkV2\Plugins\DialogEditor\Intermediate\Build\Win64\UE4Editor\Development\DialogEditor\UE4Editor-DialogEditor.exp
[3/4] UE4Editor-DialogEditor.dll
Creating library C:\Users\Sarlack\Documents\Unreal Projects\RPGFrameworkV2\Plugins\DialogEditor\Intermediate\Build\Win64\UE4Editor\Development\DialogEditor\UE4Editor-DialogEditor.suppressed.lib and object C:\Users\Sarlack\Documents\Unreal Projects\RPGFrameworkV2\Plugins\DialogEditor\Intermediate\Build\Win64\UE4Editor\Development\DialogEditor\UE4Editor-DialogEditor.suppressed.exp
0>Module.DialogEditor.cpp.obj: Error LNK2019 : unresolved external symbol "__declspec(dllimport) public: static struct FSlateBrush const * __cdecl FEditorStyle::GetBrush(class FName,char const *)" (__imp_?GetBrush@FEditorStyle@@SAPEBUFSlateBrush@@VFName@@PEBD@Z) referenced in function "public: virtual struct FSlateBrush const * __cdecl SNodePanel::SNode::GetShadowBrush(bool)const " (?GetShadowBrush@SNode@SNodePanel@@UEBAPEBUFSlateBrush@@_N@Z)
Hint on symbols that are defined and could potentially match:
"__declspec(dllimport) public: virtual struct FSlateBrush const * __cdecl FSlateStyleSet::GetBrush(class FName,char const *)const " (__imp_?GetBrush@FSlateStyleSet@@UEBAPEBUFSlateBrush@@VFName@@PEBD@Z)
0>Module.DialogEditor.cpp.obj: Error LNK2001 : unresolved external symbol "public: virtual void __cdecl SPanel::Construct(void)" (?Construct@SPanel@@UEAAXXZ)
0>UE4Editor-DialogEditor.dll: Error LNK1120 : 2 unresolved externals
0>Microsoft.MakeFile.Targets(44,5): Error MSB3073 : The command ""C:\Program Files\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" RPGFrameworkV2Editor Win64 Development -Project="C:\Users\Sarlack\Documents\Unreal Projects\RPGFrameworkV2\RPGFrameworkV2.uproject" -WaitMutex -FromMsBuild" exited with code 6.
Which suggest some missing implementation. There’s literally zero documentation about this anywhere on the internet and only a scarce few people (like 2 people) have actually written about this topic, from an extensive search on google.
Can someone please nudge me in the right direction?