I have the following code:
FBaseItem* ItemToAdd = ItemTable->FindRow<FBaseItem>(ItemID, ""); ... InventoryArray.Add(ItemToAdd);
It produces this error while compiling:
error C2664: 'int32 TArray<FBaseItem,FDefaultAllocator>::Add(const FBaseItem &)': cannot convert argument from 'FBaseItem *' to 'FBaseItem &&' note: Reason: cannot convert from 'FBaseItem *' to 'FBaseItem' note: No constructor could take the source type, or constructor overload resolution was ambiguous
How would I convert the pointer to a normal struct, other than creating a new struct and copy all the variables?