[Fixed] Register custom component visualizer

Hello,

I’m implementing a custom component visualizer to extend editor to draw debug wire sphere for a specific component.

But I can’t register my component visualizer from my module, I get a compile error when making a shareable pointer:

2>C:\Program Files (x86)\Epic
Games\4.11\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(548):
error C2243: ‘type cast’: conversion
from 'FMETA_SphereDebugVisualizer
*const ’ to ‘FComponentVisualizer *’ exists, but is inaccessible.

FMETA_SphereDebugVisualizer is my component, I try to register this way:

void FMETA_EditorDebugModule::StartupModule()
{
	// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module

    if (GUnrealEd != nullptr)
    {
        TSharedPtr<FComponentVisualizer> visualizer = MakeShareable(new FMETA_SphereDebugVisualizer());
        GUnrealEd->RegisterComponentVisualizer(UMETA_DebugSphereComp::StaticClass()->GetFName(), visualizer);
        visualizer->OnRegister();
    }
}

Someone has any idea of what I’m making wrong ?

Thanks a lot.

Damned … I was so tired when writing this code. Conversion is inacessible because my base class override is not public.

I have “class FMETA_SphereDebugVisualizer : FComponentVisualizer” instead of “class FMETA_SphereDebugVisualizer : public FComponentVisualizer”