I believe I might have lost my project

Last night I was working on the Building Escape project and ended up adding some code that crashed unreal. I’ve done it before and it fixed fine but this time when I deleted the binaries and intermediate folder to rebuild and open UE4 back up my IDEs will no longer recognize any code that originates from unreal.

There are red lines all over my code that shouldn’t be there. After hours of troubleshooting I realized that it wasn’t a problem with my IDE as it is occuring in both Rider and VS2019. And it’s not an issue with plug ins as everything works fine if I open my old Bull Cow Game project. So the suggestion I stumbled across to fix that is to delete the .vs, binaries, intermediate, saved and the sln file. I did that, had UE4 generate new visual studio files and that wouldn’t work either.

The place where i’m at now which is the massive problem is that I can’t rebuild my project because it says I have to manually rebuild, but I can’t manually rebuild through the IDE since there are so many errors through my code from it not recognizing Unreal’s code (DeltaTime, TickType, ThisTickFunction just to name a few).

TLDR;
Code has errors throughout that shouldn’t be there, ue4 is telling me it can’t rebuild my project. I have to manually rebuild but I can’t do that because of the errors and having ue4 generate new visual studio files isn’t fixing that.

At this point after beating my head into a wall for 5+ hours trying to get this fixed i’m even okay if there’s a download file somewhere with a finished project so I can just finish the last 4-5 videos I have for this project and then I can just move onto Toon Tanks. Thank you to anyone who comes across this! :slight_smile:

I wanted to upload a picture of my IDE showing the problem

Looks like you’re missing a } on line 49.

1 Like

This led me to go through and correct all the errors, which ended up fixing it. Which I never touched my .cpp file so i’m not sure how that stuff got deleted but you’re a life saver!

New much smaller issue just arose. The level we created is no longer in the project, if I search for it in the content directory nothing pops up. Is there somewhere it could be hiding or could I of just lost it in trying to rebuild it so many times? I’m not nearly as worried about this because all of my components and assets are there just not the level we made.

Have you checked in File Explorer as well?

I just tried that and nothing came up. Is there maybe a file type I could search for?

Ok, so I figured out how to get my level back and I wanted to post it here in case anyone else runs into this. So apparently Unreal has a folder including autosaves and backups under the saved folder under your project. Luckily I had an old saved folder in my recycle bin that I had previously deleted trying to fix my initial problem.

If you open a second file explorer and open the content folder under your project you can drag and drop the UMAP and UASSET files (you MUST include the matching UASSET to your UMAP)to your content folder and then save/restart Unreal and you should have most if not everything back.

This two day ordeal has really driven home that I need to set up source control with UE4. Is that something that this tutorial covers at some point or should I look elsewhere for that? Thank you again for all of the assistance.