[C++ Plugin] Create Unreal-like graph

It’s kind of a lot of classes… I’d have to write a tutorial for this, but time too short :s

But, in short, after you call:

TSharedRef<SDockTab> TAB = SNew(SDockTab).TabRole(ETabRole::NomadTab);

Add the EdGraph as a sub widget to it:

TAB->SetContent(SNew(UMyCustomGraphWidget));

UMyCustomGraphWidget is a custom SWidget you have to create yourself, subclass of

SCompoundWidget

Then inside your widget’s Construct() function you the SGraphEditor as a child, like:

ParentGraphEditor = SNew(SGraphEditor)
		.GraphToEdit(UMyEdGraph);
	ChildSlot
	[
		SNew(SVerticalBox)
		+ SVerticalBox::Slot()
			.FillHeight(1.f)
			[
				SNew(SOverlay)
				+ SOverlay::Slot()
				[
					ParentGraphEditor.ToSharedRef()
				]
			]
	];

Hmm, yeah, I did the same, but when I call OnSpawnPluginTab:

return SNew(SDockTab)
[
	SNew(UGraphWidget)
];

… and then Construct() in my widget, which is similar to yours, UE4 crashes with read access violation in MulticastDelegateBase.h …

Good news, it finally compiles! Well, almost… Output here: http://wklej.org/id/2777791/ . Any ideas how to solve this?

You got AdvancedDialogues_API in class decleration class? maybe it hsould be all caps ^^’

@MRCookie:
Hey,
How did you resolve this exception : “UE4 crashes with read access violation in MulticastDelegateBase.h”

Yes, everything is working like a charm. :slight_smile: Just follow code from SoundCueEditor.

1 Like

I’m sorry to piggyback on this… but is it possible to create this custom graph on a specific class?
Like… if I Open the editor for my blueprint class… i could have an extra tab created for this custom graph node?

Hey sorry to piggyback on this, but did you have any breakthrough on this?

Not for specific class (by selecting parent class in blueprint), but you can make your own UBlueprint asset class and extend on that. I recamand you to look up how UAnimBlueprint or UWidgetBlueprint are build because those are extended blueprints which also create classes

Hi, your can share sour source code or project??