VS 2022 not behaving properly with FVectors

Following the example code I get strange errors from Intellisense and within the Error List.

For example,

FVector CurrentLocation = GetActorLocation();

shows an error “expected a ;” and when I check the suggested fix it suggests

FVector; CurrentLocation = GetActorLocation();

which I know is not right. This also leads to CurrentLocation being marked as “undefined”. I also have errors for Super::BeginPlay() showing as class “UObject” has no member “BeginPlay” and Super::Tick(DeltaTime); showing as class “UObject” has no member “Tick”.

Of course, when compiled and the simulation ran in the UnrealEditor, everything works as expected. It’s just Visual Studio complaining even though everything is linked properly and included. It’s worth noting that none of these issues were occuring yesterday and I haven’t made any changes to my set up.

This might be due to Visual Studios IntelliSense being dumb (it happens at times). Right-click on your .ueproject file and click ‘Generate Solution’ or something like that. It’ll re-create your solution and might clear up any false errors. You may need to delete the Intermediate, Binary, and Saved folders too (these folders get generated again by the engine).

Privacy & Terms