Download

FPSProjectile.generated.h is not being generated

So I’m following along with the tutorial, I’m new to C++ but with 3 years of C# and even more in Java under my belt I’m not finding it difficult to grasp. I’ve made it down to the projectile part of the tutorial and when I click “Add code to project -> Actor” and name it, Visual Studio 2013 informs me that it cannot open “FPSProjectile.generated.h”

I open up my FPSCharacter.generated.h, find where it’s located and sure enough, all the other *.generated.h files are there. I deleted the FPSProjectile.h and .cpp and redo the process of creating the files. Same thing…

Has anyone else run into this problem yet? I’ve tried restarted both VS and UE4, but to no avail.

Edit: So I built out the project and there it is! Weird, I was getting errors when trying to build out but that time it worked! Thread’s dead baby

I have a similar problem, but the engine seems to prevent generation FPSGameMode.generated.h

I think the *.generated.h files aren’t actually generated unless there is a UCLASS(), USTRUCT(), UENUM() etc. contained in the header. They also don’t exist until the first time you go to compile and the UnrealHeaderTool runs - do you get an error during compilation that it can’t be found, or is it just an intellisense error?

I had similiar issue when I added UPROPERTY in the tutorial, I went back and commented it out.

Example:

<<bad class name >>
/** Projectile class to spawn */
UPROPERTY(EditDefaultsOnly, Category = Projectile)
TSubclassOf<class AFSProjectile> ProjectileClass;

<good>
/** Projectile class to spawn */
UPROPERTY(EditDefaultsOnly, Category=Projectile)
TSubclassOf<class AFPSProjectile> ProjectileClass;

Difficult to figure out, recommend just stepping back through your code and commenting out recently added UPROPERTY, or other macro I imagine.

I had a similar issue where it says can’t find “FPSProjectile.generated.h” in Visual Studio.
FIX: I just closed Visual Studio, opened the project in Unreal engine and rebuild the whole project then opened Visual studio and the error was gone.