virtual void Serialize(class FArchive& Ar) override
Steps to Reproduce
Hello!
In case you write a custom serialization, UHT doesn’t consider
virtual void Serialize(class FArchive& Ar) override;
as overridden Serialize method, for this reason the required method is not generated and serialization doesn’t work properly.
The fix:
[Image Removed]
Hello!
Can you provide some sample code that demonstrates the problem this is supposed to resolve?
Martin
`UCLASS()
class UTestCustomObject : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere)
FName Name;
UPROPERTY(EditAnywhere)
TArray Data;
UPROPERTY(Transient)
int8 Tile;
virtual void Serialize(class FArchive& Ar) override;
virtual bool IsAsset() const override;
};
void UTestCustomObject::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
Ar << Tile;
}
bool UTestCustomObject::IsAsset() const
{
return IsPackageExternal() && !GetPackage()->HasAnyFlags(RF_Transient) && !HasAnyFlags(RF_Transient | RF_ClassDefaultObject) && !GetPackage()->HasAnyPackageFlags(PKG_PlayInEditor);
}`
Thanks for sharing the code. I was able to reproduce the problem locally and filed an internal bug report.
Regards,
Martin
Hi,
Your change was accepted and submitted as CL#44305575. We missed the 5.6.1 deadline so 5.7 will be when the change goes live.
I should mention that you can submit Pull Request through our GitHub repo for those types of submissions. The PRs are evaluated by the owner of the system they target and you get credited when your changes are accepted.
https://dev.epicgames.com/documentation/en\-us/unreal\-engine/contributing\-to\-the\-unreal\-engine
Regards,
Martin