Serialization broken
FDMX2 opened this issue · comments
Hi,
the SerializeDemo demo works correctly with different *.bullet files (like the given testFile.bullet with the falling fragmented donut in it). So deserialization works as expected.
Running the demo without a *.bullet file, creates the scene correct, but the serialization leads to a corrupt file.
Opening the created file with FileInspector only shows many empty PointerArrays.
To simplify internal object management logic, the serialization and deserialization code was rewritten in C#, but it's not quite done yet.
I think I got stuck precisely because the file format is really complicated and I was missing such a useful tool as FileInspector. I'll look at it later today. It should start working once this line is implemented:
Currently any chunk in a serialized file is treated as a PointerArray since the DnaNr is left as 0, which is the ID for a PointerArray.
Probably needs more testing, but seems to work now.