I can not find my C++ Class in Unreal

I created new C++ Class “Tank.h” and “Tank.cpp” , I then compiled from Unreal but when I tried to reference the parent class of my blueprint I can not find any Tank reference at all !! where I should look ? or why this class not visible in Unreal Editor ?

Here is the Tank.h file:

#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "Tank.generated.h"

UCLASS()
class TANKS_API ATank : public APawn
{
	GENERATED_BODY()

public:
	// Sets default values for this pawn's properties
	ATank();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

};

what did you set as UCLASS() values
did you inherit from AActor or some other class like that?

I added the code, what do you think ?

hmn just tried your code and I have no problems finding your class.

  • Just create a new blueprint
  • Input Tank in the text input field below class (1)
  • Select your class as a parent (2)

see my picture above , no tank class !!! I use UE 4.21 is it a bug ?

forgot I added a

#pragma once

to the Tank.h file on the top
but that should not change anything and I assumed you just forgot to copy paste it in

Can you add the cpp code as well.

And I assume you already tried the traditional delete

  • Folder /Intermediate
  • Folder /Binaries
  • Generated your visual studio project files again
1 Like

I did not know about that “traditional delete” but this solved my problem !! this also mean it is a bug because developer should never do that. Many thanks for your help

:stuck_out_tongue: wanted to write the

Traditional delete Dance

since I have to do that quite regularly…

traditional delete works for me. (UE 4.25.1)