I’ve got myself stuck on this lecture using engine version 4.18.2.
I tracked down the problem to two areas. Firstly when declaring the Barrel StaticMeshComponent in TankAimingComponent.h:
UStaticMeshComponent* Barrel = nullptr;
Adding this causes the engine to crash with no feedback. I initially thought this might be because i needed to include the Compoents/StaticMeshComponent.h header, which i did with no success. Removing the assignment to nullptr allows the engine to load.
However, after doing this, the engine still crashes when i click play at the point of setting Barrel=BarrelToSet inside UTankAimingComponent::SetBarrelReference.
It seems to be an issue assigning to the Barrel property inside TankAimingComponent. Currently I’m lost for answers so any suggestions are welcome.
Issue is at this commit on my github: https://github.com/ChristopherJohnston/UnrealCourse_04_BattleTank/tree/892218527cb299f10d5333f0483e8f382abea6e3