Need a clean build after restarting

(This is not related to this lesson specifically, it happens every time)
So, I’m doing something wrong. Everything works fine, but then I close Unreal and shut down my computer, and when I want to resume my course, I get a bunch of weird “this blueprint uses invalid class” errors, the Game mode is gone, etc.

Then I run a dotnet clean command, and then a full build, and everything is back to normal… (until the next time I restart my computer).

TBH, IDK if restarting the computer has anything to do with the problem or if it’s just restarting Unreal.
I have a feeling that this is something very basic I’m doing wrong.

While this is a small nuisance while working on a course project, I’m guessing this will be a significant problem when working on a bigger, more complex project.

Does anyone have a clue of what might be happening?

I’m using Unreal 5.3, Rider 2023.3.3. (I also have VS2022 installed, and updated with pretty much all components)

Thanks in advance.

Best regard,
Breno.

I have a shell script that deletes the following:

.\Binaries\
.\Intermediate\
.\DerivedDataCache\

If I really want to clean the up the project, I destroy everything but the bare minimum that has to be checked into source control:

.\Binaries\
.\Build\
.\DerivedDataCache\
.\Intermediate\
.\Saved\
.\Script\
.idea\ 
.vs\
*.sln 
*.xcworkspace\
*.code-workspace\
.vscode\ 
.\Plugins\*\Binaries\
.\Plugins\*\Intermediate\

Interesting. So It’s not something I’m doing wrong?
Any idea why this happens?

Curious: When you destroy everything but the bare minimum, does it include the solution file (*.sln)? Doesn’t the Unreal project need it? (Sorry if it’s an obvious question, I’m new to Unreal.)

See the Live Coding Issues lecture. You need to build with Unreal closed if you used Live Coding before you re-open the project.

So I’d suggest you run the build task whenever you close your project in Unreal.

The solution file is generated by Unreal. It says how to build the project.

I’m afraid I have to nitpick Dan’s wording. Yes, Unreal can generate the SLN and yes, it tells how to build the project. But the way that’s worded makes it sound like Unreal needs that file.

Unreal Engine does not use the SLN file. That is only for Visual Studio. You can regenerate it, if you need it, by right-clicking on the uproject file and telling it to Generate Visual Studio solution. More can be read about how to generate IDE project files here: How to Generate Unreal Engine Project Files for Your IDE | Unreal Engine 5.3 Documentation

If you’re using Rider as your IDE, it will be an .idea directory that contains all the project information. But Rider can open and use the uproject file directly, no need to generate an SLN. However, Rider can read SLN files, too.

Visual Studio Code uses the code-workspace file as well as the .vscode directory.

xcode on the mac uses the xc-workspace file.

Personally, I disable live coding. And I always start Unreal by debugging my project in my IDE. This workflow works best for me.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms