UnityEngine.UI.SGDefaultControls.CreateUIElementRoot C# (CSharp) Method

CreateUIElementRoot() private static method

private static CreateUIElementRoot ( string name, Vector2 size ) : GameObject
name string
size UnityEngine.Vector2
return UnityEngine.GameObject
        private static GameObject CreateUIElementRoot(string name, Vector2 size)
        {
            GameObject child = new GameObject(name);
            RectTransform rectTransform = child.AddComponent<RectTransform>();
            rectTransform.sizeDelta = size;
            return child;
        }