private void ToolButtonAtIndex(ToolButton toolButton, int i) { toolButton.transform.SetParent(btnWrap.transform, false); float posX = UIConstants.ToolButtonWidth * i + UIConstants.ToolButtonSpacing * (i + 1); float width = UIConstants.ToolButtonWidth; toolButton.SetPosXAndWidth(posX, width); ButtonAtIndex(toolButton, i); }