GENERATED_BODY() issue from 4.12 to 4.14

Hi,

We are currently upgrading from 4.12 to 4.14 (testing 4.13 along the way to be sure) and we are up to updating to 4.14 but we are having issues doing so.

When we try to build on 4.14, we get one of our class throwing this error:

Error	C2664	'int32 UVOComponent::CountVoxels(const TArray<TEnumAsByte<EVOGroup>,FDefaultAllocator> &,const TArray<TEnumAsByte<EVOGroup>,FDefaultAllocator> &)': cannot convert argument 1 from 'TArray<EVOGroup,FDefaultAllocator>' to 'const TArray<TEnumAsByte<EVOGroup>,FDefaultAllocator> &'

this error is marked at the GENERATED_BODY() line of one of our classes:

UCLASS(editinlinenew, meta = (BlueprintSpawnableComponent, DisplayName = "Voxelized Object Component"), ClassGroup = Rendering)
class VOXELIZEDOBJECTPLUGIN_API UVOComponent : public UVOMeshComponent
{

	GENERATED_BODY()
public:

	UVOComponent(const FObjectInitializer& Initializer);

	/** Simple collision primitive to use as the root component. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UBoxComponent* BaseCollisionComponent;

	/** Static Mesh used as model for generating voxels */
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UStaticMesh* OriginalMesh;
...
}

I am aware that from one version to the other Generated_Body usually changes but we were wondering if this was a common issue with 4.14

Hi,

This is covered in the release notes:

“TEnumAsByte is no longer used for generated code involving enum classes.
If you get errors involving TEnumAsByte with your UENUM enum class, please provide a uint8 base to your type and remove the TEnumAsByte usage.”

Steve

It’s not an answer, but.

In most cases the issue is not within GENERATED.

It’s within class definition. Once class created in UE4 some of its methods and members are defined. In newer version however, definition may vary, that causes class that was “generated” by engine before have a different definitions and don’t match actual engine’s parent class/macro definition.

There may be an option to generate same class in 4.14 and take a look on it’s definition. Or inspect parent class definition.