private void BroadcastContainerWidth() { #if UNITY_EDITOR Undo.SetCurrentGroupName("ColumnContainer BroadcastContainerWidth"); int group = Undo.GetCurrentGroup(); #endif for (int i = 0; i < transform.childCount; i++) { Transform child = transform.GetChild(i); RowContainer rowContainer = child.GetComponent <RowContainer>(); if (rowContainer) { #if UNITY_EDITOR Undo.RecordObject(child.transform, "Child SetParentContainerWidth"); #endif rowContainer.SetParentContainerWidth(bounds.size.x); } } #if UNITY_EDITOR Undo.CollapseUndoOperations(group); #endif }