Autocomplete not working in VSCode

Just got to the bit where Sam is talking about Scope Resolution Operator, and I’m not getting anything like the autocomplete options he is. He’s getting a load after typing FVector::, whereas I get nothing. When I start typing, I get some - But he’s finding ‘Dist’, and I’m not getting that all.

Could you show your full VS Code window please?

Hello! I’ve tried typing it out again on VSCode and as you can see, looks like I’m only getting u_ related autoccompletes, nothing like Sam was getting.

I don’t think you have the workspace open, could you do what was asked please?

Could you clarify what you mean by “Workspace”?

It would be much easier if you do what is asked.

Unreal generates a workspace for Unreal projects containing the engine source code and your project’s. I assume you just have your project’s folder open and not the workspace.

To clarify, here’s what I’m doing to get to my code -

  • I open up the ObstacleAssault Project from the Epic Game Store
  • I locate the ‘MovingPlatform’ C++ within the Unreal Editor
  • I double click on that.
  • My code opens up in VSCode.

I assume that’s what you mean by workspace. Here’s a full screenshot of my entire screen.

Personal Note - “It would be much easier if you do what is asked” could have come across a little mean, there.

That is not opening the workspace. You just have the C++ files open in VS Code. If you’re familiar with Visual Studio that would be similar to having the files open in the editor and not the solution.

You are not giving the editor the full information of the project.

If you have the Source Code editor set to VS Code in your editor preferences then you would do Tools > Generate VS Code Project which generates the workspace file that describes the workspace (it’s just a JSON file that looks like

{
	"folders": [
		{
			"name": "SimpleShooter",
			"path": "."
		},
		{
			"name": "UE5",
			"path": "C:\\Program Files\\Epic Games\\UE_5.0"
		}
	],
	"settings": {
		"typescript.tsc.autoDetect": "off"
	},
	"extensions": {
		"recommendations": [
			"ms-vscode.cpptools",
			"ms-dotnettools.csharp"
		]
	}
}

)

Then doing Tools > Open VS Code from Unreal or File > Open Workspace and the n navigating to that code-workspace file that was generated would mean VS Code is now aware of Unreal code.

Sorry. I was only trying to get to the cause faster for you. As I didn’t even know if this was actually your issue. It’s rather hard to help if you don’t provide the information that is asked because it helps diagnose what the actual issue is.

If you provided this information from the onset then you could have fixed your issue days ago.

If you have the Source Code editor set to VS Code in your editor preferences then you would do Tools > Generate VS Code Project which generates the workspace file that describes the workspace (it’s just a JSON file that looks like

Cannot locate “Generate VS Code Project”, please advise.

EDIT - I went back a few steps and can confirm that I am working from the Workspace that was generated from Unreal - The file called “ObstacleAssault.code-workspace” in my ObstacleAssault folder.

Is there some feature relating to Intellisense in VSCode that is not enabling for me - Because snippets are obviously working in some respect, but I’m not getting the same results Sam is in this vide.

Could you show your VS Code window?

Sure, here you go. I did have unreal open in the background, but opened this VSCode window by opening the .code-workspace file in my Obstacle Assault folder.

I’m pretty sure I followed this part of the tutorial step by step but I wonder if there’s something I missed with Snippets. Did install the C/C++ IntelliSense, as well as the Extension Pack, and the Unreal Engine 4 Snippets, and they are all running from what I can see…

That looks fine, are you able to showcase it not working?

Here we go - https://youtu.be/q9wl4PRTeZM

Here’s a bit of VSCode running, and I play the bit of the course where it looks like it should work. As you can see, I get the ‘uplay’, ‘uspawn’ stuff, but not the rest.

Does it not work if you give it a minute first? Do you have your project send engine on an SSD?

Nope, left it a while and I don’t get the same autocomplete.

Believe Unreal and VSCode would be installed on an NVMe, while my project is on a seperate SSD.

Strange, and you do have the Microsoft C/C++ extension installed?

Yup - Here’s the extensions I have installed.

Could you try disabling/uninstalling everything else?

Just tried that, to no success sadly! I’m getting the impression that it might be an Intellisense issue. Maybe I should start this part of the tutorial from scratch, uninstall VSCode / Visual Studio and try that. Would moving over to Visual Studio make much of a difference overall?

If it still complies then that’s exactly what it is. You can also use a different editor it you prefer, you don’t have to use VS Code. You could try Visual Studio instead.

Privacy & Terms