0

I am new to C++ and Unreal Engine, and I am following a Udemy tutorial on how to use Unreal Engine. However, when I created a C++ component for an actor in my scene, VSCode gave me an error within by header file saying that I should update my include path. This error is given to all the include statements in the header file. I have not many changes to the default code given by Unreal, and this is a completely new project, so I have not many changes (that I know of) in the settings of the project. I am also using the newest version of Unreal Engine, version 4.25.0.

Here is the code for the header file:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "WorldPosition.generated.h"


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BUILDINGESCAPE_API UWorldPosition : public UActorComponent
{
    GENERATED_BODY()

public: 
    // Sets default values for this component's properties
    UWorldPosition();

protected:
    // Called when the game starts
    virtual void BeginPlay() override;

public: 
    // Called every frame
    virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;


};

This is an image of the error given to me on VSCode

  • There are many similar questions on SO. If the one above doesn't help then do some searching. Basically the problem is that VS Code doesn't know what your environment is and you have to adjust its settings. – john May 19 '20 at 05:12
  • Thank you for the help! The link above helped a lot, and the problem is now solved. – AnonUser1035 May 20 '20 at 19:03

0 Answers0