UE4.20 is missing the IntelliSense IncludePath for the *.generated.h files

Ok, here is my current workaround. The following python script should grab all directories we need:
To Add those easy, go to Your gameProject\Intermediate\ProjectFiles\YourProject.vcxproj and add the resulting string. You can also try to add them via VS, but for me it didn’t copied all paths oO

edit update this script will now automatically find the needed Includes paths and will add them to your Project. You will just need to save this code to a Python (3.6) Script, located in your GameProjects folder, next to the *sln file

edit fixed a rare bug in the script + moved the code to pastebin for simpler copy:
https:///Vvu3WcJh

You can vote for the ticket: Unreal Engine Issues and Bug Tracker (UE-62042)

,it’s works! ,and i have another question,my create class,the cpp file have the same problem:***.h can’t be open,if write whole src it’s work

3q,I have already solved it,like .generated.h,just edit …..\Source\MyProject,add -----public-----in it’s last

so it not work today, i have this problem too not helping me

Unreal Engine Issues and Bug Tracker (UE-62042) well it got fixed, just not part of an hotfix.

Still not fixed in 4.20…

EDIT: My bad. as Frigerius pointed out. I needed Python 3.6+.

EDIT2: Removed outdated hastebin link

ORIGINAL MESSAGE:
I thought I would give this a try. I’ve never used python before but when I run it with py27x64 I’m getting this error:

File "FixIncludePaths.py", line 7
  cur_proj_path = f'Intermediate\\ProjectFiles\\{project_name}.vcxproj'
                                                                      ^
SyntaxError: invalid syntax

Is the website screwing with the characters or something? I already had to correct a single-space indent issue.

Maybe, but you will need min py3.6, since format strings are not available in py2

Tried again in Python 3.7. Everything worked perfectly! One click and boom. no more inaccessible generated.h errors!

There isn’t a better/faster solution than this until 4.20.3 arrives (Presuming that does actually correct the issue). I can’t begin to imagine the kind of insanity that led to your post having a negative score :S (Maybe due to the indent issue). but I at least brought it back to neutral standing. though it should be at least 9001. :slight_smile:

Thank you Frigerius!!

Have an upvote for a clear, detailed response with images, and doing the legwork of listing out all the files. You’re the hero we need.

The related ticket (Unreal Engine Issues and Bug Tracker (UE-62042)) is marked fixed, but same issue here, so it’s not fixed after all

(here) 89 errors down to 4. Now I have errors “only” like class “UObject” has no member “BeginPlay”. HUGE help, thanks!

Then take my python script. KWS mentioned that there is another fix for it on github, which ist not included yet.

In case someone still has a problem: For me in the latest 4.20 code (after 4.20.3) it still was a problem. But when I added the following line to my myGame.Target.cs and myGameEditor.Target.cs it solved the problem (I am not using the python script):
BuildEnvironment = TargetBuildEnvironment.Shared;

It needs to be added under the ‘public myGameTarget’ line.
Maybe it helps you.

return line in get_engine_root should be

return split_[1].split('\\Build\\BatchFiles\\Build.bat')[0].replace('"', '')

Then it will work for projects in directories with spaces since it will remove " from line start.

thx, updated the code and moved it to pastebin.

Thanks to both of you. The script is awesome! Don’t worry about the deleted comments. I actually did it this time to remove redundant info. :slight_smile:

It seems 4.20.3 did actually fix the issue. :slight_smile:

Still not fixed in 4.20.3