GlobalComponentSystem.cs 451 B

12345678910111213141516
  1. using UnityEngine;
  2. namespace ET
  3. {
  4. public class GlobalComponentAwakeSystem: AwakeSystem<GlobalComponent>
  5. {
  6. public override void Awake(GlobalComponent self)
  7. {
  8. GlobalComponent.Instance = self;
  9. self.Global = GameObject.Find("/Global").transform;
  10. self.Unit = GameObject.Find("/Global/Unit").transform;
  11. self.UI = GameObject.Find("/Global/UI").transform;
  12. }
  13. }
  14. }