UE4.20 and Visual Studio 2017 Errors

Hello,

I have recently downloaded UE4.20 and also Visual Studio 2017. To be able to use Visual Studio 2017 I chose it as the source code editor. The code compiled without any problems, however inside the IDE, I am getting errors saying that some of the header files are inaccessable, even though they worked fine in 4.19 and Visual Studio 2015.

This doesn’t cause any issues with the compiler. Has anyone else had a problem like that? And how was it solved?

It’s not telling you that the header is inaccessible, but that the individual member in question is. Many previously-public members in 4.19 have been made private in 4.20 and exposed through accessors. I’m not in a position to check this particular case here, but when updating to 4.20, I did have to make changes like the following to my own classes:

StaticMeshComp->bGenerateOverlapEvents = false;

to

StaticMeshComp->SetGenerateOverlapEvents(false);

It’s likely that you’re in a similar situation and need to replace direct references to these member variables with calls to accessor functions.

Thank you very much for your reply, but something else is causing these errors as well, since it also doesn’t like Super::BeginPlay();, Super::Tick(DeltaTime);, SetupPlayerInputComponent and Generated_Body()

I’m also experiencing this problem

I tried creating a new project (just in case something changed in this regard)
but in the new project i’m also getting an error on all of the includes of *.generated.h files aswell as
the GENERATE_BODY macro

I am also experiencing the same issue.

Look at my answer here: VS cannot find generated.h files - C++ - Unreal Engine Forums

I followed your instructions but it’s still giving me errors on the include of generated files and the generated body

I fixed the path, try again now. Also vote here so Epic fixes this quickier Unreal Engine Issues and Bug Tracker (UE-62042)

Can confirm, this fixes the issue everything works now including generate_body
One remark though the path contains 2 “/” before YourModuleName (should only be 1)

Thank you very much

One way that I found is to delete the folder where the public and the private one are, because in the editor ue4 it does not find them as such, then once the private folder is deleted and in case it saves the files created in that private folder, restart and It was automatically corrected, it’s something foreign to ue4, I hope it helps this …

Una forma que encontré es borrar la carpeta donde esta el public y el privado, pues en el editor ue4 no los encuentra como tal, entonces una vez borrado la carpeta privado y por si acaso salve los archivos creados en esa carpeta de privado, reinicie y se corrigió automáticamente, es algo extranio de ue4, espero que ayude esto…