Compile button disappears

Hello,

I’ve experienced a very annoying behaviour in the editor. I’m working on a C++ project and performing modifications on the code using Visual Studio. After that I push the Compile button of the Editor. In general it works fine, however in many cases the Compile button suddenly disappears from the editor (without exiting from the editor) and it becomes impossible to recompile the project. What can be the reason of this ?

Thanks,
G

My experience is that this happens when I do some bad stuff in visual studio. One example I just experienced is that I added a “replicatedUsing” attribute to one of my uproperties in a .h file… When I compile this is visual studio I got a link error because I didn’t implmenet a GetLifetimeReplicatedProps method in the same class. If I just build again I get no error in VS, but now my compile button in the editor is gone and I need to restart.

This must be something about the hotReload thing that breaks things when the c++ stuff is not in a good shape.

I always quit and restart editor and studio when I notice this has happened.

–kg

This usually fixes this issue for me:

  • Make sure you are building for the right configuration
    ( DebugGame Editor for VS debugging, Development Editor for optimized testing, etc)… Or just use the UnrealVS tool to do a batch build.
  • Make sure your project is compiling without any errors (Do a full Ctrl+Alt+F7 rebuild, not just a regular F7 build).
  • Make sure that you’re actually running the most recent build for the compiled configuration in the previous steps. The best way to know for sure is to actually run it from VS.
  • Still not working? Try the following batch script:

NOTICE: Save to your project’s root folder, and replace [MyProject] with the name of your project before you run it!

@echo off
setlocal

SET BaseName=[MyProject]
SET ProjectName=%BaseName%.uproject
SET SolutionName=%BaseName%.sln
SET PromptMessage="Now,\n  * Right-click %ProjectName%\n  * Choose 'Generate Visual Studio project files'.\n  * Double-click %ProjectName% to open UE4."

:PROMPT
SET /P AREYOUSURE=This will delete Binaries, Intermediate, and Saved. Continue (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END

rd /s /q Binaries
rd /s /q Intermediate
rd /s /q Saved
attrib -R %SolutionName%
attrib /S -R Build

mshta javascript:alert(%PromptMessage%);close();

:END
endlocal

After you run the batch script, and you’ve followed it’s on-screen instructions, you should repeat steps 1-3.
If you still don’t get a compile button, all I can tell you is you might have to create a new project, and import your old stuff into it. Make sure that it’s an actual C++ project, and not a Blueprints one.

Hello,

I posted the solution here: