GlobalViewMgr.cs 1.0 KB

123456789101112131415161718192021222324252627
  1. using FairyGUI;
  2. using UnityEngine;
  3. namespace ET.Client
  4. {
  5. [ObjectSystem]
  6. public class GlobalViewAwakeSystem : AwakeSystem<GlobalViewComponent>
  7. {
  8. protected override void Awake(GlobalViewComponent self)
  9. {
  10. GlobalViewComponent.Instance = self;
  11. self.Global = GameObject.Find("/Global").transform;
  12. self.Unit = GameObject.Find("/Global/Unit").transform;
  13. self.RecycleNode = GameObject.Find("/Global/RecycleNode").transform;
  14. self.BattleCamera = GameObject.Find("/Global/BattleCamera").GetComponent<Camera>();
  15. //self.UICamera = GameObject.Find("/Global/UICamera").GetComponent<Camera>();
  16. /*var uiContentScale = self.Global.GetComponent<UIContentScaler>();
  17. uiContentScale.scaleMode = UIContentScaler.ScaleMode.ScaleWithScreenSize;
  18. uiContentScale.designResolutionX = 1600;
  19. uiContentScale.designResolutionY = 2500;
  20. uiContentScale.screenMatchMode = UIContentScaler.ScreenMatchMode.MatchWidthOrHeight;*/
  21. }
  22. }
  23. }