GlobalViewMgr.cs 1.1 KB

12345678910111213141516171819202122232425262728
  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. CameraMgr.Init();
  16. //self.UICamera = GameObject.Find("/Global/UICamera").GetComponent<Camera>();
  17. /*var uiContentScale = self.Global.GetComponent<UIContentScaler>();
  18. uiContentScale.scaleMode = UIContentScaler.ScaleMode.ScaleWithScreenSize;
  19. uiContentScale.designResolutionX = 1600;
  20. uiContentScale.designResolutionY = 2500;
  21. uiContentScale.screenMatchMode = UIContentScaler.ScreenMatchMode.MatchWidthOrHeight;*/
  22. }
  23. }
  24. }