Hello everyone.I have bought Unreal Engine 5 C++ Developer: Learn C++ & Make Video Games Course I had a failure in C++ yesterday.I am in the CryptRaider game.While I was in the 81 th lecture,I had these failures which are in the images .How can I solve these problems?
Did you do Tools > Refresh VS Code Project within Unreal?
I did.The problem is that I cant save the changes of visual stiduo code.For example,I made a actor component from C++ but when I open the file of UnrealEngine5,the all changes has gone.I have learnt Control Shift B to save the changes,but in this game it doesnt work.
And the failures of visual stiduo code are these
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Mower.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class UMower : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UMower();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
};
````// Fill out your copyright notice in the Description page of Project Settings.
#include "Mower.h"
// Sets default values for this component's properties
UMower::UMower()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
// ...
}
// Called when the game starts
void UMower::BeginPlay()
{
Super::BeginPlay();
// ...
}
// Called every frame
void UMower::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
AActor* Owner = GetOwner();
FString Name = Owner->GetActorNameOrLabel();
FVector OwnerLocation = Owner->GetActorLocation();
FString OwnerLocationString = OwnerLocation.ToCompactString();
UE_LOG(LogTemp, Display, TEXT("Mover Owner Address: %u"), Owner);
UE_LOG(LogTemp, Display, TEXT("Mover Owner: %s with location %s"), *Name, *OwnerLocationString);
}
`
Have you seen the Live Coding Issues lecture? You need to build with Unreal closed before you re-open it.
And the failures of visual stiduo code are these
If it compiles but IntelliSense shows errors then doing Tools > Refresh VS Code project from within Unreal should fix that.
Could you show what task you’re using?
I am using CryptRaider Win64 Development Build.Actually I cant save the c++ components when I close the UnrealEngine5 .For Example when I open the U5, I must add the component of Mover again Mister
That would be the wrong task, that builds a standalone .exe.
You need to use CryptRaiderEditor Win64 Development Build which builds a .dll that the Unreal Editor loads
Thank you so much mister.I am glad to buy this course which has expert people.It has solved.Thanks a lot.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.