Custom component visualizer in plugin


I’m trying to add custom component visualizer in my plugin and I’m getting an “unresolved external symbol” error.
This is the code that I’ve added in the StartupModule in my Module.cpp.

	TSharedPtr<FComponentVisualizer> Visualizer = MakeShareable(new FGraphVisualizer());

	if (Visualizer.IsValid())
		GUnrealEd->RegisterComponentVisualizer(UGraphVisualizerComponent::StaticClass()->GetFName(), Visualizer);

This is the error.

1>Module.cpp.obj : error LNK2019: unresolved external symbol “public: __cdecl FGraphVisualizer::FGraphVisualizer(void)” (??0FGraphVisualizer@@QEAA@XZ) referenced in function “public: virtual void __cdecl Module::StartupModule(void)” (?StartupModule@Module@@UEAAXXZ)

Am I missing an include somewhere?

Also, has anyone managed to create a custom component visualizer and include it in a plugin?


Ok. So after learning a bit more c++ turns out that the error was exactly what it said. I declared the constructor but didn’t implement it.