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

SetParentAndAlign() private static method

private static SetParentAndAlign ( GameObject child, GameObject parent ) : void
child UnityEngine.GameObject
parent UnityEngine.GameObject
return void
        private static void SetParentAndAlign(GameObject child, GameObject parent)
        {
            if (parent == null)
                return;

            child.transform.SetParent(parent.transform, false);
            SetLayerRecursively(child, parent.layer);
        }