I suddenly started getting “unresolved external symbol” errors.
I found the function causing this, but i dont understand why its causing the errors.
This is the function
void UModelData_RSClass::encode_or_decode_Format_2(bool encode, UMod* Mod, UBuffer_RSClass* byteBuffer)
{
isDefaulted = false;
if (encode) {
/*uint8 propertyCodeEncode = 0;
PropertyMetadata.KeySort([](int32 A, int32 B) { return A < B; });
for (const TPair<uint8, FPropertyMetadata>& pair : PropertyMetadata)
{
propertyCodeEncode = pair.Key;
if (PropertyMetadata.FindRef(propertyCodeEncode).OverrideModes_Mods.Contains(Mod)) { //if The Mod contains this propertyCode
byteBuffer->writeByte(propertyCodeEncode);
switch (propertyCodeEncode)
{
case 2:
byteBuffer->writeLong(parent_id);
break;
case 3:
byteBuffer->writeStringCp1252NullTerminated(name);
break;
//End_Object_Base
case 11:
byteBuffer->writeVector_16_Array(vertexPositions, 10);
break;
case 12:
byteBuffer->writeInt_Array(faceIndices1);
break;
case 13:
byteBuffer->writeInt_Array(faceIndices2);
break;
case 14:
byteBuffer->writeInt_Array(faceIndices3);
break;
case 15:
byteBuffer->writeByte_Array(face_material_index);
break;
case 16:
byteBuffer->writeLong_Array(material_ids);
break;
case 17:
byteBuffer->writeInt_Array(faceColors);
break;
case 18:
byteBuffer->writeVector_16_Array(vertexNormals, 1000);
break;
case 19:
{
byteBuffer->writeShort(faceTextureUCoordinates.Num());
for (int i0 = 0; i0 < faceTextureUCoordinates.Num(); i0++)
{
byteBuffer->writeFloat_16(faceTextureUCoordinates[i0].arr[0], 2048);
byteBuffer->writeFloat_16(faceTextureUCoordinates[i0].arr[1], 2048);
byteBuffer->writeFloat_16(faceTextureUCoordinates[i0].arr[2], 2048);
byteBuffer->writeFloat_16(faceTextureVCoordinates[i0].arr[0], 2048);
byteBuffer->writeFloat_16(faceTextureVCoordinates[i0].arr[1], 2048);
byteBuffer->writeFloat_16(faceTextureVCoordinates[i0].arr[2], 2048);
}
}
break;
case 20:
byteBuffer->writeByte_Array(faceTransparencies);
break;
case 21:
byteBuffer->writeByte_Array(faceRoughness);
break;
case 22:
byteBuffer->writeByte_Array(faceMetallic);
break;
}
}
}*/
}
else
{
uint8 propertyCode = 0;
while (byteBuffer->offset < (byteBuffer->array.Num())) {
propertyCode = byteBuffer->readByte();
AddPropertyOverride(propertyCode, Mod);
switch (propertyCode)
{
case 2:
byteBuffer->readLong(parent_id);
break;
case 3:
byteBuffer->readStringCp1252NullTerminated(name);
break;
case 4:
{
int64 idTemp = id;
Recycle();
id = idTemp;
}
break;
case 11:
byteBuffer->readVector_16_Array(vertexPositions, 10);
break;
case 12:
byteBuffer->readInt_Array(faceIndices1);
break;
case 13:
byteBuffer->readInt_Array(faceIndices2);
break;
case 14:
byteBuffer->readInt_Array(faceIndices3);
break;
case 15:
byteBuffer->readByte_Array(face_material_index);
break;
case 16:
byteBuffer->readLong_Array(material_ids);
break;
case 17:
byteBuffer->readInt_Array(faceColors);
break;
case 18:
byteBuffer->readVector_16_Array(vertexNormals, 1000);
break;
case 19:
{
faceCount = byteBuffer->readShort();
F2DArrayElement_Float faceUV_elem; faceUV_elem.arr.Init(0,3);
faceTextureUCoordinates.Init(faceUV_elem,faceCount);
faceTextureVCoordinates.Init(faceUV_elem,faceCount);
for (int i0 = 0; i0 < faceCount; i0++)
{
byteBuffer->readFloat_16(faceTextureUCoordinates[i0].arr[0], 2048);
byteBuffer->readFloat_16(faceTextureUCoordinates[i0].arr[1], 2048);
byteBuffer->readFloat_16(faceTextureUCoordinates[i0].arr[2], 2048);
byteBuffer->readFloat_16(faceTextureVCoordinates[i0].arr[0], 2048);
byteBuffer->readFloat_16(faceTextureVCoordinates[i0].arr[1], 2048);
byteBuffer->readFloat_16(faceTextureVCoordinates[i0].arr[2], 2048);
}
}
break;
case 20:
byteBuffer->readByte_Array(faceTransparencies);
break;
case 21:
byteBuffer->readByte_Array(faceRoughness);
break;
case 22:
byteBuffer->readByte_Array(faceMetallic);
break;
}
}
}
}
If I simply remove the commented text between the /* and */, the errors disappear.
Why could this be?
I am using Rider and UE4.27.