GlobalComponentSystem.cs 524 B

1234567891011121314151617
  1. using UnityEngine;
  2. namespace ET
  3. {
  4. [EntitySystemOf(typeof(GlobalComponent))]
  5. public static partial class GlobalComponentSystem
  6. {
  7. [EntitySystem]
  8. private static void Awake(this GlobalComponent self)
  9. {
  10. self.Global = GameObject.Find("/Global").transform;
  11. self.Unit = GameObject.Find("/Global/Unit").transform;
  12. self.UI = GameObject.Find("/Global/UI").transform;
  13. self.GlobalConfig = Resources.Load<GlobalConfig>("GlobalConfig");
  14. }
  15. }
  16. }