public GameObject CreateGuiCell(GuiCell MyCell) { MyCell.ObjectReference = (GameObject)CreateGuiItem (MyCell.Position, MyCell.Size); return MyCell.ObjectReference; }
public List<GuiCell> CreateGuiCells(Vector3 CellSize) { List<GuiCell> MyCells = new List<GuiCell> (); for (int j = 0; j < ColumnsMax; j++) for (int i = 0; i < RowsMax; i++) { GuiCell NewCell = new GuiCell(); NewCell.Position = new Vector3(i*CellSize.x, j*CellSize.y, 0); NewCell.Position = new Vector3(NewCell.Position.x*MarginPercentageX+MarginAdditionX, NewCell.Position.y*MarginPercentageY+MarginAdditionY, 0); NewCell.Size = CellSize; MyCells.Add (NewCell); } return MyCells; }