Hi,
I am attempting to create a drop-down menu for my blueprints where I can easily set the wanted stat rather than typing it out and potentially making a mistake. However, when I try to do this it returns the following errors. I am still getting to grips with C++ and Unreal so I am a little confused about what the error means.
Any help would be greatly appreciated,
Jonathan Palmer
Error: (Line 35) The property “Stat1” references type “StatSelection” but the code generation hash is zero. Check for circular dependencies or missing includes.
Error: (Line 44) The property “Stat2” references type “StatSelection” but the code generation hash is zero. Check for circular dependencies or missing includes.
C++ Code:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Spell_Master.h"
#include "Spell_PassiveBuff_Master.generated.h"
/**
*
*/
UCLASS( )
class REMOVED_API ASpell_PassiveBuff_Master : public ASpell_Master
{
GENERATED_BODY( )
public:
/*------------------
* INSERT EFFECT HERE
------------------*/
#pragma region Stats
/*-----
* Stats
-----*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Stats|Stat 1", EDITANYWHERE )
int I_Stat1;
UPROPERTY( BlueprintReadOnly, CATEGORY = "Stats|Stat 1", EDITANYWHERE, meta = ( ValidEnumValues = "Strength, Agility, Stamina, Intelligence" ) )
StatSelection Stat1;
UPROPERTY( BlueprintReadOnly, CATEGORY = "Stats|Stat 2", EDITANYWHERE )
bool B_Stat2;
UPROPERTY( BlueprintReadOnly, CATEGORY = "Stats|Stat 2", EDITANYWHERE )
int I_Stat2;
UPROPERTY( BlueprintReadOnly, CATEGORY = "Stats|Stat 2", EDITANYWHERE )
StatSelection Stat2;
#pragma endregion
#pragma region Timing
/*---------
* Cast Time
---------*/
/*Cast Time: Hours*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cast Time", EDITANYWHERE )
int I_CastTime_H;
/*Cast Time: Minutes*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cast Time", EDITANYWHERE )
int I_CastTime_M;
/*Cast Time: Seconds*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cast Time", EDITANYWHERE )
float F_CastTime_S;
/*--------
* Cooldown
--------*/
/*Cooldown: Hours*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cooldown", EDITANYWHERE )
int I_Cooldown_H;
/*Cooldown: Minutes*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cooldown", EDITANYWHERE )
int I_Cooldown_M;
/*Cooldown: Seconds*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Cooldown", EDITANYWHERE )
float F_Cooldown_S;
/*--------
* Duration
--------*/
/*Duration: Hours*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Duration", EDITANYWHERE )
int I_Duration_H;
/*Duration: Minutes*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Duration", EDITANYWHERE )
int I_Duration_M;
/*Duration: Seconds*/
UPROPERTY( BlueprintReadOnly, CATEGORY = "Timing (Edit)|Duration", EDITANYWHERE )
float F_Duration_S;
#pragma endregion
};
UENUM( BlueprintType )
enum class StatSelection : uint8
{
Strength UMETA( DisplayName = "Strength" ),
Agility UMETA( DisplayName = "Agility" ),
Stamina UMETA( DisplayName = "Stamina" ),
Intelligence UMETA( DisplayName = "Intelligence" ),
};