示例#1
0
 void DrawOrientationManagerButton(float width)
 {
     if (!UIManager.useOrientationManager)
     {
         return;
     }
     if (QUI.GhostButton("Add Orientation Manager to Scene", QColors.Color.Gray, width, 18))
     {
         OrientationManager.AddOrientationManagerToScene();
     }
 }
示例#2
0
 void DrawOrientationManagerButton()
 {
     if (!UIManager.useOrientationManager)
     {
         return;
     }
     QUI.BeginHorizontal(WIDTH_420);
     {
         if (QUI.Button("Add Orientation Manager to Scene"))
         {
             OrientationManager.AddOrientationManagerToScene();
         }
     }
     QUI.EndHorizontal();
     QUI.Space(SPACE_2);
 }
        void Awake()
        {
            if (_instance != null && _instance != this)
            {
                Debug.Log("[DoozyUI] There cannot be two OrientationManagers active at the same time. Destryoing this one!");
                Destroy(gameObject);
                return;
            }

            _instance = this;
            DontDestroyOnLoad(gameObject);

            if (GetComponent <Canvas>().isRootCanvas == false)
            {
                GetComponent <RectTransform>().anchorMin = Vector2.zero;
                GetComponent <RectTransform>().anchorMax = Vector2.one;
            }
        }