Return ENUM Variable value from function for comparison?

Hey try it like this.

/* Enumerated Type For Powerup Class */


UENUM()
namespace EBZGame_WeaponClass
{
	enum Type {
		EWC_None			UMETA(DisplayName = "None"),
		EWC_Cannon			UMETA(DisplayName = "Cannon"),
		EWC_Gun				UMETA(DisplayName = "Gun"),
		EWC_Rocket			UMETA(DisplayName = "Rocket"),
		EWC_Mortar			UMETA(DisplayName = "Mortar"),
		EWC_Special			UMETA(DisplayName = "Special"),
		EWC_Shield			UMETA(DisplayName = "Shield"),
		EWC_Max				UMETA(DisplayName = "Max")
	};
}

is how you could return a enum.


TEnumAsByte<EBZGame_WeaponClass::Type> YourEnum;
TEnumAsByte<EBZGame_WeaponClass::Type> GetEnumType()
{
      return YourEnum;
}

Hope it helps. :slight_smile: