Hello all,
I’m admittedly quite a newbie when it comes to dabbling in C++ and hence, am attempting to remedy this.
On my journey to learn about using C++ classes and scripts in UE4, I decided to start with this tutorial:
https://docs.unrealengine.com/latest/INT/Programming/QuickStart/4/index.html
I, to the best of my knowledge, have followed it exactly. I’m getting stuck however, on the step where it shows the content browser. Theirs looks like this:
Mine, however, looks like this:
I did a lot of google searching on the issue and found numerous older topics nearly identical to mine, but no resolution that seems to work. I simply cannot seem to get my C++ FloatingActor class to show up in the content browser, nor can I go backwards any further in the hierarchy than the Content folder by pressing the left arrow.
My code looks identical to that of the tutorial:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Actor.h"
#include "FloatingActor.generated.h"
UCLASS()
class QUICKSTART2_API AFloatingActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AFloatingActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
float RunningTime;
};
// Fill out your copyright notice in the Description page of Project Settings.
#include "QuickStart2.h"
#include "FloatingActor.h"
// Sets default values
AFloatingActor::AFloatingActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void AFloatingActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AFloatingActor::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
FVector NewLocation = GetActorLocation();
float DeltaHeight = (FMath::Sin(RunningTime + DeltaTime) - FMath::Sin(RunningTime));
NewLocation.Z += DeltaHeight * 20.0f; //Scale our height by a factor of 20
RunningTime += DeltaTime;
SetActorLocation(NewLocation);
}
It’s the same place as theirs in the Solution Explorer in Microsoft Visual Studio:
It compiles without issue. I’ve compiled it both in Visual Studio as well as Unreal. I’ve restarted the UE4 engine as well. I’ve looked at other forum threads, but nothing they’ve described seems to yield a solution that allows me to see my C++ classes in the content browser.
Does anyone see something I’m missing, or know how to remedy this?