概要
private static RectTransform CreateCopiedRectTransformObject( RectTransform original ) { var go = new GameObject(); var t = go.AddComponent<RectTransform>(); t.SetParent( original.parent ); t.localPosition = Vector3.zero; t.localRotation = Quaternion.identity; t.localScale = Vector3.one; t.pivot = original.pivot; t.anchorMin = original.anchorMin; t.anchorMax = original.anchorMax; t.anchoredPosition = original.anchoredPosition; t.sizeDelta = original.sizeDelta; return t; }