using System.Collections.Generic; using MemoryPack; namespace ET { [Invoke((long)SceneType.Main)] public class FiberInit_Main: AInvokeHandler { public override async ETTask Handle(FiberInit fiberInit) { Scene root = fiberInit.Fiber.Root; await EventSystem.Instance.PublishAsync(root, new EntryEvent1()); await EventSystem.Instance.PublishAsync(root, new EntryEvent2()); await EventSystem.Instance.PublishAsync(root, new EntryEvent3()); AA aa = root.AddComponent(); BB bb = aa.AddComponent(); CC cc = aa.AddComponent(); bb.B = 1; cc.C = 2; byte[] bytes = MemoryPackSerializer.Serialize(aa); AA aa2 = MemoryPackSerializer.Deserialize(bytes); Log.Debug($"11111111111111111111111111: {aa2}"); byte[] bytes2 = MongoHelper.Serialize(aa); AA aa3 = MongoHelper.Deserialize(bytes2); Log.Debug($"11111111111111111111111111: {aa3}"); } } }