namespace ET { public class GlobalConfigComponentAwakeSystem : AwakeSystem { public override void Awake(GlobalConfigComponent t) { t.Awake(); } } public class GlobalConfigComponent : Entity { public static GlobalConfigComponent Instance; public GlobalProto GlobalProto; public void Awake() { Instance = this; string configStr = ConfigHelper.GetGlobal(); this.GlobalProto = MongoHelper.FromJson(configStr); } } }