I’ve been following the the FPS tutorial and am having some trouble with getting it to compile after having completed the section on overriding the HUD function to add your own crosshair.
This here’s the code from the .h file:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/HUD.h"
#include "FPSHUD.generated.h"
/**
*
*/
UCLASS()
class FPSPROJECT_API AFPSHUD : public AHUD
{
GENERATED_UCLASS_BODY()
/* Primary draw call for the HUD*/
virtual void DrawHUD() override;
private:
/* Crosshair asset pointer*/
UTexture2D* CrosshairTex;
// Set the crosshair texture
static ConstructorHelpers::FObjectFinder<UTexture2D> CrosshairTexObj(TEXT("Texture2D'/Game/crosshair.crosshair'"));
CrosshairTex = CrosshairTexObj.Object;
CrosshairTex = CrosshairTexObj.Object;
};
Whenever I try to compile it UE complains about there being a syntax error in this line: