SerializerTest.cs 536 B

1234567891011121314151617181920212223242526
  1. using MemoryPack;
  2. namespace ET
  3. {
  4. [MemoryPackable]
  5. [ComponentOf(typeof(Scene))]
  6. public partial class AA : Entity, IAwake
  7. {
  8. }
  9. [MemoryPackable]
  10. [ComponentOf(typeof(AA))]
  11. public partial class BB : Entity, IAwake, ISerializeToEntity
  12. {
  13. [MemoryPackInclude]
  14. public int B { get; set; }
  15. }
  16. [MemoryPackable]
  17. [ComponentOf(typeof(AA))]
  18. public partial class CC : Entity, IAwake //, ISerializeToEntity
  19. {
  20. [MemoryPackInclude]
  21. public int C { get; set; }
  22. }
  23. }