Hey guys. Trying to create a list of buttons showing games, and the butons are all created and working fine, but i can NOT figure out how to change their position on the canvas / panel i instantiate them on. They always just stay at the same place.
What am i missing, thats most likely too obvious for my dumb arse to see.
int i = 0;
foreach (RoomInfo r in roomList)
{
GameObject g = Instantiate(buttonRoomPrefab, panelRoomList.transform);
g.name = r.Name;
g.GetComponentInChildren<Text>().text = r.Name;
//g.GetComponent<RectTransform>().anchoredPosition = new Vector2(0, i * 55);
g.transform.position = panelRoomList.transform.position + new Vector3(0, i * 55, 0);
i++;
}