Generated.h disappeared!

Expected Behaviour:

The Code should run.

Observed Behaviour:

There comes a strange Error Message: fatal error C1083: file (Include) can’t be oppened: “Tank.generated.h”: No such file or directory

If I search for the filepath (Unreal Projects\BattleTank\Intermediate\Build\Win64\UE4Editor\Inc\BattleTank) I find a folder with many Files but no file that is Tank.generated.h or Tank.gen.cpp.

Already tried:

I restarted unreal, rebuild Visual Studio, search for the code C1083 and I tried to copy the Tank.generated.h from an other Project.

Can you show the code? You sure you not missed UCLASS()? UHT wont create this file is there is not object to register, all UPROPERTY and such are ignored.

Have you tried to right click and select "regenerate "on the .uproject file?
(I have a couple times where generated.h missing or still hold the old definition of UFUNCTION/UPROPERTY, and this was something I do to get past it)

Thanks for your answer, but it hasn’t worked.

No I havn’t missed UCLASS(). But here’s code:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

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

class UTankBarrel;
class UTankAimingComponent

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

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

	UFUNCTION(BlueprintCallable, Category = Setup)
	void SetBarrelReference(UTankBarrel* BarrelToSet);

	void AimAt(FVector HitLocation);

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

	UTankAimingComponent* TankAimingComponent = nullptr;

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

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

	UPROPERTY(EditAnywhere, Category = Firing)
		float LaunchSpeed = 100000;
};