Packaging error: Assertion failed !(StructFlags & STRUCT_IsPlainOldData)

This is assertion fail, in C++ if something went wrong at runtime it is find to hard a fault of it, because of it UE4 use assertion system (it’s more like policy) where, where you place check() function with bool condition which represents state that code expects in order to work properly, if it’s false it crashes the engine with failed constion as a error and location in code where it happened, so in this case !(StructFlags & STRUCT_IsPlainOldData) in line 2450 in file Class.cpp in FScriptStruct which represents blueprint struct.

It crashes but atleast you know why it crashed and it’s while point of assertion you can read more about it here:

Now in this case it append in CopyScriptStruct() and this perticilar assetion check if struct with flag STRUCT_CopyNative in reflection system don’t have STRUCT_IsPlainOldData flag set, it can not have set both. Those flag seems to decides how variable of this struct is copy in memory and they can’t have set both.

void UScriptStruct::CopyScriptStruct(void* InDest, void const* InSrc, int32 ArrayDim) const
{
	uint8 *Dest = (uint8*)InDest;
	check(Dest);
	uint8 const* Src = (uint8 const*)InSrc;
	check(Src);

	int32 Stride = GetStructureSize();

	if (StructFlags & STRUCT_CopyNative)
	{
		check(!(StructFlags & STRUCT_IsPlainOldData)); // should not have both
		UScriptStruct::ICppStructOps* TheCppStructOps = GetCppStructOps();
		check(TheCppStructOps);
		check(Stride == TheCppStructOps->GetSize() && PropertiesSize == Stride);
		if (TheCppStructOps->Copy(Dest, Src, ArrayDim))
		{
			return;
		}
	}
	if (StructFlags & STRUCT_IsPlainOldData)
	{
		FMemory::Memcpy(Dest, Src, ArrayDim * Stride);
	}