GlobalViewMgr.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. using FairyGUI;
  2. using UnityEngine;
  3. namespace ET.Client
  4. {
  5. [ObjectSystem]
  6. public class GlobalViewMgr : Singleton<GlobalViewMgr>, ISingletonAwake
  7. {
  8. //public Camera UICamera;
  9. public Camera BattleCamera;
  10. public Transform Global;
  11. public Transform Unit { get; set; }
  12. public Transform RecycleNode { get; set; }
  13. public GComponent HeadbarView { get; set; }
  14. public void Awake()
  15. {
  16. Global = GameObject.Find( "/Global" ).transform;
  17. Unit = GameObject.Find( "/Global/Unit" ).transform;
  18. RecycleNode = GameObject.Find( "/Global/RecycleNode" ).transform;
  19. BattleCamera = GameObject.Find( "/Global/BattleCamera" ).GetComponent<Camera>();
  20. CameraMgr.Init();
  21. //self.UICamera = GameObject.Find("/Global/UICamera").GetComponent<Camera>();
  22. /*var uiContentScale = self.Global.GetComponent<UIContentScaler>();
  23. uiContentScale.scaleMode = UIContentScaler.ScaleMode.ScaleWithScreenSize;
  24. uiContentScale.designResolutionX = 1600;
  25. uiContentScale.designResolutionY = 2500;
  26. uiContentScale.screenMatchMode = UIContentScaler.ScreenMatchMode.MatchWidthOrHeight;*/
  27. }
  28. }
  29. }