Ejemplo n.º 1
0
        public static void AddPanel(MenuCommand menuCommand)
        {
            GameObject panel = DefaultControls.CreatePanel(MenuOptions.GetStandardResources());

            MenuOptions.PlaceUIElementRoot(panel, menuCommand);
            RectTransform component = panel.GetComponent <RectTransform>();

            component.anchoredPosition = Vector2.zero;
            component.sizeDelta        = Vector2.zero;
        }
Ejemplo n.º 2
0
        static public void AddPanel(MenuCommand menuCommand)
        {
            GameObject go = DefaultControls.CreatePanel(GetStandardResources());

            PlaceUIElementRoot(go, menuCommand);

            // Panel is special, we need to ensure there's no padding after repositioning.
            RectTransform rect = go.GetComponent <RectTransform>();

            rect.anchoredPosition = Vector2.zero;
            rect.sizeDelta        = Vector2.zero;
        }