ET版本:et7
Unity版本:2021.3.14f1
Net版
本:7
能帮忙解决的话,必谢!!



大佬们求助,我用bson序列化save到本地文件,然后读取文件。测试的手机是安卓,偶尔会出现进去玩游戏后退出再次进去存档读取不了,没有办法稳定复现,报错如下:
System.FormatException: An error occurred while deserializing the saveEntityHashset field of class ET.Save: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the componentsDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: Attempted to read past the end of the stream. —> System.FormatException: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the componentsDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: Attempted to read past the end of the stream. —> System.FormatException: An error occurred while deserializing the componentsDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: Attempted to read past the end of the stream. —> System.FormatException: An error occurred while deserializing the childrenDB field of class ET.Entity: An error occurred while deserializing the childrenDB field of class ET.Entity: Attempted to read past the end of the stream. —> System.FormatException: An error occurred while deserializing the childrenDB field of class ET.Entity: Attempted to read past the end of the stream. —> System.IO.EndOfStreamException: Attempted to read past the end of the stream. at MongoDB.Bson.IO.BsonStreamExtensions.ReadBsonType (MongoDB.Bson.IO.BsonStream stream) [0×00000] in <00000000000000000000000000000000>:0 at MongoDB.Bson.IO.BsonBinaryReader.ReadBsonType () [0×00000] in <00000000000000000000000000000000>:0 at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2[TValue,TItem].Deserialize (MongoDB.Bson.Serialization.BsonDeserializationContext