public static void RefreshAllChildPosition(Transform parent) { if (parent == null) { return; } for (int i = 0; i < parent.childCount; i++) { NkUtil.RefreshAllChildPosition(parent.GetChild(i)); } parent.localPosition = parent.localPosition; }