Compile in Editor doesn't apply code changes

Hi, when I hit the Compile button in the Editor after modifying C++ lines in files in Visual Studio it says it compiles fine but actually doesn’t apply the changes of the modified code, while exiting the editor and compiling with F7 in Visual Studio does compile and apply changes. How can I really compile from the editor? I must be missing something.

#Build Configuration

are you sure you are compiling

#Development editor win 64 ?

Hi, Rama, do you mean the Build Configuration in File tab? It’s set to Development, but I don’t see “editor win 64”, so possibly this is not what you are talking about. Can you specify where to find the Build Configuration option you mean?

Well, if there’s an option to Compile C++ code it should be possible to do it without restarting.

1 Like

I read in another thread that making changes to c++ can require that you restart the Unreal editor for the changes to appear.

You can recompile as long as you do not change the interface of your DLLs. That means u do not add new declarations (methods or classes) but only adapts existing method and classes.

I tried only changing the Jump Velocity of a character, but it only applies the change if I exit the Editor,rebuild in Visual Studio and reopen the Editor, not if hiting the compile button in the editor.

Any ideas?

How did you change the jump velocity? Values changed in the constructor won’t get reapplied to existing objects.

As Marc said, only functions other than the constructor will be updated. This is actually a regression that we noticed too late to fix for 4.0.1, but will be fixed in a future release! Sorry.

Hi, thanks for answering.

In the project I’m working on I started from the Third Person with C++ code sample, and the variable was changed in the generated "name_of_theproject"Character.cpp file, in the PCIP block:

From this: CharacterMovement->JumpZVelocity = 600.f;
To this: CharacterMovement->JumpZVelocity = 10.f;

Sorry, I pressed enter and the comment went public without being ended, here it continues:

So that change in a line only applies if exiting the editor and compiling, and opening it back again; just like in the UDK system with Unrealscript. By now this has not been a big issue (just a very little time loss), but I would be very happy to see the engine improved so the editor compile button can apply changes from the editor.