The Blueprint shows compilation errors on Start up

I have multiple C++ classes that I use as a base for my various blueprint. The issue is that every time I open up the project, multiple nodes show errors after the compilation is finished.

  1. The camera references. ( It says the camera couldn’t be found) - I have to drag the camera component every time.
  2. The “Find Actors of Class” node resets( the given class goes away leaving it to the select class option) - I have to select my c++ class again every time.

Edit - It also resets my friction value along with “Use Controller Pitch”.

Run your game from your visual studio project.

How do you do that?

Run the .sln (project solution) file generated by unreal

Does doing that also opens the editor?

Once you build and run the project it will launch the editor with your project (that includes your custom c++ files)

But due to live coding, Visual Studio can’t build the project… that has to be done from the editor.

Close down the editor. You cannot run live coding and compile at the same time. You need to first re-run your project “from scratch” in visual studio for it to work. Live coding is limited to the amount of changes it can handle.

Small things like variable adjustments are ok but more major changes require a full compile

1 Like

I’ll try that

P.S. - The values that are getting reset are not set in the c++ file btw. For e.g. the friction value, I only touched it in the blueprint, and it gets reset to 0 every time.

Unreal will reset any c++ class that it can’t find along with casts and variables. As for the friction value, maybe you need to set it in the class defaults setting (not sure what properties it has set)

The build finished but it did not open the editor. After opening the editor there were no errors, but something even weirder happened. It reset my default map…In settings, it says the correct map but on load, it gives me a blank untitled map.

P.S. - Do you know why compilation takes 5-10 minutes every third or fourth time even if I just changed a variable value and other times just 2 seconds

Do you have your game project set as the startup project in VS? (it’s name should be in bold).

Press “Start without debugging” (green empty arrow) or “Local Windows debugger” filled green arrow.

It should launch the project.

I did not. Thanks.