Skip to content

Instantly share code, notes, and snippets.

@pkucherov
Forked from boocs/vsc-ext-ue4-int-fixes.md
Created May 22, 2021 05:01
Show Gist options
  • Save pkucherov/772f34f35fec26e56d8c130276952d79 to your computer and use it in GitHub Desktop.
Save pkucherov/772f34f35fec26e56d8c130276952d79 to your computer and use it in GitHub Desktop.

VSCode/UE4 Intellisense Fixes Extension

Table of Contents


Unreal Engine

Compatible

  • 4.25
  • 4.26.1+

(newer Unreal Engine versions may require latest extension)

Incompatible

  • 4.26.0

General

This is the README for version 1.5.0 of the extension "UE4 Intellisense Fixes".

It currently supports Unreal Engine v4.25 and v4.26.1+

Feel free to comment about it here: https://gist.github.com/boocs/f63a4878156295b6e854cac68672f305#comments

You can comment about anything including any code quality comments. I'm just starting out in TypeScript and never really learned JavaScript so any info is great.

Code is hosted here: https://github.com/boocs/ue4-intellisense-fixes

Features

General
  • The extension will fix UE v4.25 and v4.26.1+ VSCode Intellisense issues on startup.
    • It must happen at startup or the Tag Parser will add unneeded symbols to the browse cache file
4.26.1+
  • Fixes invalid paths in compile command's response file.
  • Adds missing source/headers to compile command's file.
    • Runs on startup. You must restart VSCode to fix Intellisense errors for new files
  • Fixes UE4 workspace's Tag Parser includes to increase performance.
  • Fix for wrong cppStandard and to not pollute global user setting.
  • Optional fix: Removes project specific references from UE4 workspace and add general Intellisense to UE4 source code.
  • Fix for deprecated externalConsole setting in launch.json
  • Real time
    • Detects project resets and will run extension again
    • Warns to restart VSCode on new Source/Header detection
4.25
  • Fixes no defines.
  • Fix for wrong cppStandard and to not pollute global user setting.
  • Fixes UE4 workspace's Tag Parser includes to increase performance.
  • Fix for deprecated externalConsole setting in launch.json
  • Real time
    • Detects project resets and will run extension again
Logs
  • You can also see a log of what the extension is doing:

  • You can also get to the log by clicking on this icon. It will appear for 2 minutes after the extension is done.

Requirements

  • VSCode v1.52.0 or higher
  • Microsoft's C/C++ extension (ms-vscode.cpptools)
  • A UE4 4.25 or 4.26.1+ project
  • A YourProjectName.uproject file in your project's directory. *
  • A YourProjectName.code-workspace file in your project's directory with: *
    • A folder in "folders" named UE4 and a path leading to the UE4 directory

Note: * UE4 should set this up automatically for you when you first create your project.

Installation

  1. Download from here: https://github.com/boocs/ue4-intellisense-fixes/releases/

  2. Click the VSIX file to download (version will be different than pic)

    1. Click the Extensions button inside VSCode
    2. Click the ellipsis (3 dots) in upper-right corner of left side panel
    3. Choose "Install from VSIX..."
    4. Select the vsix file you just downloaded from GitHub

Running

The extension will fix your projects on startup of VSCode.

  1. You must first enable fixes in the settings. (see Extension Settings)

  2. After enabling fixes, restart VSCode for it to fix your project.

    Note: Make sure to remove any previous fixes and reset your project (see Known Issues). If installing from previous versions make sure to delete the previous version's extension folder. Skip this step if you've never used any fixes.

Tag Parser Cache

  1. After the fix has run and it's working, on your UE4 project, make sure to reset the Tag Parser cache to take advantage of the smaller cache size

  2. From the VSCode Command Palette, type reset and choose 'C/C++: Reset Intellisense Database'

  3. It'll take ~15 minutes for the Tag Parser to finish running

  4. You should only have to do this once.

Multiple module projects

When you add new source/header files and restart VSCode, to fix Intellisense for the new files, the extension will ask what response file you want to use for each new file.

If you don't want to mess with figuring it out, cancel the choice menu and reset your project which should fix it instead.

Extension Settings

  • Fixes are disabled by default. You must enable them.
  • You can only set these settings in the global User settings.
  • Restart VSCode for newly enabled fixes to take effect.

Here are the settings:

This extension contributes the following settings:

  • UE4IntellisenseFixes.enableFixes false
  • UE4IntellisenseFixes.enableOptionalFixes false
  • UE4IntellisenseFixes.cppStandard ""

Known Issues

Note: If you've installed with a vsix file you can safely install new updates without uninstalling any previous version.

There could be conflicts with fixes previously done.

  • Remove old unused settings

  • Remove any prior fixes and reset your project.

  • Delete old ue4-intellisense-fixes extension folder prior to copying new one over

Note: You can skip this step if you've never fixed your project's Intellisense.

To reset your project right click on your YourProjectName.uproject file, in your project directory, and choose Generate Visual Studio Project Files...

Note: The wording may be different depending on your IDE

Example:

Note: You should only have to do this once per project.

Release Notes

https://github.com/boocs/ue4-intellisense-fixes/blob/master/CHANGELOG.md

Removing old unused settings

Go to your global User settings file.

Easiest way to open this file:

  1. Go to your settings and click on User

  2. Scroll down till you see any setting with "Edit in settings.json" and click it.

  3. This will take you to the global user setting but will also automatically paste the random setting. Delete this newly created setting if you don't want it

  4. Now look in the file for old UE4Intellisense settings. Delete these.

Uninstalling

You can uninstall/disable the extension and reset your project and everything should be back to normal.

Comments

Comment using the gist feature below: (Must be signed in)


To Top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment