Hello, I am attempting to get a custom class for a tech demo however I am running into issues.
First of all Intellisense is jumping up my posterior about UE types, as if it is not pulling the includes in correctly or something. It also does not find the generated.h file for the class. when I attempt to build it, I get a bunch of parse errors due to the previously mentioned UE types not being recognized.
UE Version: 4.21.2
VS2017 Version: 4.7.03062
Here is my code:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Runtime/Core/Public/Containers/UnrealString.h"
#include "resource.generated.h"
/**
*
*/
UClass(Blueprintable,BlueprintType)
public class MININGTECHDEMO_API resource
{
GENERATED_BODY();
public:
resource();
~resource();
UFunction(BluprintCallable)
void UpdateOAmt(FString operation, float val);
UFunction(BluprintCallable)
void SetName(FString name);
UFunction(BluprintCallable)
void SetDesc(FString desc);
UFunction(BluprintCallable)
void SetType(FString typ);
UFunction(BluprintCallable)
void SetTier(int tier);
UFunction(BluprintCallable)
void SetStage(int stage);
UFunction(BluprintCallable)
void SetBSize(float bsize);
UFunction(BluprintCallable)
FString GetName();
UFunction(BluprintCallable)
FString GetDesc();
UFunction(BluprintCallable)
FString GetType();
UFunction(BluprintCallable)
int GetTier();
UFunction(BluprintCallable)
int GetStage();
UFunction(BluprintCallable)
float GetOAmt();
UFunction(BluprintCallable)
float GetBSize();
private:
int ResTier;
int ResStage;
float ResBaseSize;
float ResOAmt;
FString ResName;
FString ResDesc;
FString ResType;
};
Here are the errors:
Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file “resource.generated.h” MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 7
Error (active) E0018 expected a ‘)’ MiningTechDemo F:\UE4\Epic Games\UE_4.21\Engine\Source\Runtime\Core\Public\Templates\Atomic.h 188
Error (active) E0018 expected a ‘)’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 12
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 12
Error (active) E0018 expected a ‘)’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 38
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 39
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 42
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 45
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 48
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 51
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 54
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 57
Error (active) E0065 expected a ‘;’ MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 60
Error (active) E0169 expected a declaration MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 63
Error (active) E0169 expected a declaration MiningTechDemo F:\UE4\Projects\MiningTechDemo\Source\MiningTechDemo\resource.h 71