UHT Couldn't Find Parent Type of a Module Declared in Build.cs

Hello! I’m creating an Scene Component with a custom Component Visualizer but I’m having problems trying to add this module to my plugin, I have added already “ComponentVisualizers” on my private dependences Module Names and UnrealEd, but I’m still getting this error from UHT when I’m compiling.

1>EXEC : error : Couldn’t find parent type for ‘ActorLauncherVisualizer’ named ‘FComponentVisualizer’ in current module or any other module parsed so far.

here’s my Actor Launcher Visualizer.h file:

#pragma once

#include "CoreMinimal.h"
#include "ComponentVisualizer.h"
#include "ActorLauncherComponent.h"
#include "ActorLauncherVisualizer.generated.h"

UCLASS()
class MYGAME_API FActorLauncherVisualizer : public FComponentVisualizer
{
	GENERATED_BODY()

public:

	virtual void DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) override;

	UActorLauncherComponent* GetEditedTargetingComponent() const;

private:

	/**Index of target in selected component*/
	int32 CurrentlySelectedTarget;
};

and Here’s my Module build.cs Private Dependency Modules

    		PrivateDependencyModuleNames.AddRange(
    			new string[]
    			{
                    "Projects",
    				"InputCore",
    				"UnrealEd",
    				"LevelEditor",
    				"CoreUObject",
    				"Engine",
                    "UnrealEd",
    				"Slate",
                    "PropertyEditor",
                    "SlateCore",
                    "ComponentVisualizers",
    				// ... add private dependencies that you statically link with here ...	
    			}
    			);

Is this a Bug or I have done something wrong with my module? if so, can anyone help me to shed light on this? Thanks!

You shouldn’t have used UCLASS and GENERATED body on an FClass (non UObject derived class).

1 Like