|
@@ -29,6 +29,7 @@ namespace ET
|
|
|
GetOneConfigBytes getOneConfigBytes = new() { ConfigName = configType.Name };
|
|
GetOneConfigBytes getOneConfigBytes = new() { ConfigName = configType.Name };
|
|
|
byte[] oneConfigBytes = await EventSystem.Instance.Invoke<GetOneConfigBytes, ETTask<byte[]>>(getOneConfigBytes);
|
|
byte[] oneConfigBytes = await EventSystem.Instance.Invoke<GetOneConfigBytes, ETTask<byte[]>>(getOneConfigBytes);
|
|
|
LoadOneConfig(configType, oneConfigBytes);
|
|
LoadOneConfig(configType, oneConfigBytes);
|
|
|
|
|
+ ConfigProcess();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public async ETTask LoadAsync()
|
|
public async ETTask LoadAsync()
|
|
@@ -52,6 +53,8 @@ namespace ET
|
|
|
LoadOneConfig(type, configBytes[type]);
|
|
LoadOneConfig(type, configBytes[type]);
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+
|
|
|
|
|
+ ConfigProcess();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static void LoadOneConfig(Type configType, byte[] oneConfigBytes)
|
|
private static void LoadOneConfig(Type configType, byte[] oneConfigBytes)
|
|
@@ -60,5 +63,16 @@ namespace ET
|
|
|
ASingleton singleton = category as ASingleton;
|
|
ASingleton singleton = category as ASingleton;
|
|
|
World.Instance.AddSingleton(singleton);
|
|
World.Instance.AddSingleton(singleton);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private void ConfigProcess()
|
|
|
|
|
+ {
|
|
|
|
|
+ var hashSet = CodeTypes.Instance.GetTypes(typeof (ConfigProcessAttribute));
|
|
|
|
|
+ foreach (Type type in hashSet)
|
|
|
|
|
+ {
|
|
|
|
|
+ object obj = Activator.CreateInstance(type);
|
|
|
|
|
+ ((ISingletonAwake)obj).Awake();
|
|
|
|
|
+ World.Instance.AddSingleton((ASingleton)obj);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|