Can't add class

Hello!

I was going to add 2 new classes to my project, TestBot (A character) and TestAIController (An AIController). The first one went fine, however when I tried to create the second one I got this message:

“Failed to add class TestAIController. Failed to automatically hot reload the ‘TestProject’ module.”

However it is created, and exists in my “Unreal Projects\TestProject\Source\TestProject” directory. But when I open it up with VS2013 the code within seems to only be halfway done, comparing to the code generated in my TestBot, which worked fine.

Can anyone help me figure this out?

Look like something messed up with hot reload

  1. Close editor so it won’t hot reload (Which you probably maybe did already :p)
  2. Close VS
  3. Right click *.uproject file in your project directory and click “Generate VS project file”
  4. Open VS project

This should sync things up, do this always when VS project file is different from what you see in Source directory for some reason

The problem still persists after trying this. Just to clarify, in my TestBot.h I see this:

UCLASS()
class TESTPROJECT_API ATestBot : public ACharacter
{
	GENERATED_BODY()

public:
	// Sets default values for this character's properties
	ATestBot();

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void Tick( float DeltaSeconds ) override;

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

	
	
};

But in my TestAIController.h all I have is:

UCLASS()
class TESTPROJECT_API ATestAIController : public AAIController
{
	GENERATED_BODY()
	
	
	
	
};

As you can see it seems to begin similarly as TestBot.h, but for some reason it seems to cut short.