GlobalComponent.cs 617 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. namespace ET
  3. {
  4. public class GlobalComponent: Singleton<GlobalComponent>, ISingletonAwake
  5. {
  6. public Transform Global;
  7. public Transform Unit { get; set; }
  8. public Transform UI;
  9. public GlobalConfig GlobalConfig { get; set; }
  10. public void Awake()
  11. {
  12. this.Global = GameObject.Find("/Global").transform;
  13. this.Unit = GameObject.Find("/Global/Unit").transform;
  14. this.UI = GameObject.Find("/Global/UI").transform;
  15. this.GlobalConfig = Resources.Load<GlobalConfig>("GlobalConfig");
  16. }
  17. }
  18. }