UnityEngine.UI.DefaultControls.CreatePanel C# (CSharp) Method

CreatePanel() public static method

public static CreatePanel ( Resources resources ) : GameObject
resources UnityEngine.Resources
return UnityEngine.GameObject
        public static GameObject CreatePanel(Resources resources)
        {
            GameObject obj2 = CreateUIElementRoot("Panel", s_ThickElementSize);
            RectTransform component = obj2.GetComponent<RectTransform>();
            component.anchorMin = Vector2.zero;
            component.anchorMax = Vector2.one;
            component.anchoredPosition = Vector2.zero;
            component.sizeDelta = Vector2.zero;
            Image image = obj2.AddComponent<Image>();
            image.sprite = resources.background;
            image.type = Image.Type.Sliced;
            image.color = s_PanelColor;
            return obj2;
        }