How do you forward declare structs from another class? I have found no way to do this as I am fairly new to C++ in UE4.
I have a USTRUCT in an Inventory System Library Class called FBaseItemData. I need to(due to circular dependency) forward
declare that struct in a Master Item Class. But I have no idea how to do this. Some help would be great. I have forward declared the base
class in the Master Item Class but as soon as I add the UPROPERTY() macro above the FBaseItemData which is forward
declared the compiler freaks out. Iām just so stuck so any help would be great.
//============================
// CLASS FORWARD DECLARATIONS
//============================
class UInventory_System_Library;
struct FBaseInventoryItemData;
//===============================================
// MASTER INVENTORY ITEM CLASS DEFINITION
//===============================================
UCLASS(Blueprintable)
class QUEST_ELTALE_KINGDOM_API UMaster_Inventory_Item : public UPlayer_Character_Library
{
GENERATED_BODY()
//This declaration forward declares the Inventory System Library Class.
UInventory_System_Library* Inventory_System_Library_FD_Class;
public:
//====================================
//HOW DO I FORWARD DECLARE THE STRUCT???
//==========================================
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = āTestā)
FBaseInventoryItemData* Waaaaaa = Boo;
};
//========================
// END OF SCRIPT
//========================