您当前的位置:首页 > 文章 > 处理错误:The same field name is serialized multiple times in the

处理错误:The same field name is serialized multiple times in the class or its parent class.

作者:阿文 时间:2024-07-12 阅读数:227 人阅读
C#报错:The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(TreasureBox) _collider
分析原因:
父类和子类定义了相同名字的属性,导致序列化时候报错.

解决办法
删除子类的相同名字的属性即可。

本站大部分文章、数据、图片均来自互联网,一切版权均归源网站或源作者所有。

如果侵犯了您的权益请来信告知我们删除。邮箱:1451803763@qq.com