Now here is the example:
// [Serializable] // I could put here too the result still the same
struct DataPos
{
float posX;
float posY;
float rot;
};
[Serializable]
struct ShipData
{
// this is just enumeration for type
eType type;
// here I was trying only data position
DataPos datapos;
}
The binaryformatter DOES NOT WORK WELL on this structure. I tried to put padding too in the enumeration and same thing. It doesn't say it is illegal. It just slows the transfer data. It takes 3 days to debug this shit.
Here after I change the data into this structure
[Serializable]
struct ShipData
{
// this is just enumeration for type
eType type;
// not using the struct
float posX;
float posY;
float rot;
}everything goes well. This is really stupidd.. The BinaryFormatter should tell he can't serialize that if he can't. Not just by keep silent and let the programmer debug himself.
No comments:
Post a Comment