So I followed the video exactly when using forward declarations etc. and now it won’t compile. Unreal throws an error on line 7 of Tank.h stating “Tank.generated.h” doesn’t exist (no such file or directory). I’ve poured over the code for the past 2 days and I can’t see anything obviously wrong. It was working, and now it’s not. The only thing I changed was to add the forward declarations exactly as in the video. I’ve watched it a couple of times since and carefully matched my code to the video and as far as I can tell my code is exactly the same.
It gets worse though. I attempted to regenerate the project files and now when I try to launch the project in Unreal I get the following message; “The following modules are missing or built with a different engine version: UE4Editor-BattleTank.dll Would you like to rebuild them now?” but when I click yes it says “BattleTank could not be compiled. Try rebuilding from source manually” and kicks me back out to the launcher.
I’m completely stuck here. Hours of searching on the net have proved fruitless so far. I have been using source control but I’m not using Source Tree as it bears absolutely no resemblance to the one Ben uses in the lecture about source control (which tbh I found very confusing and not well covered anyway). I’m not sure how to ‘roll back’ to an earlier commit in the program I’m using. I’m going to look it up now but I’d preferably like to find a solution to the above if possible so I can avoid it happening again.
Can anyone help?
Thanks.