Hi guys,
I tried to Instantiate a button into the content of a scrollview, after i ran the game the button goes massively wrong positioning and scaling, even though there is a Verticle Layout group to the content and i gave the button a Layout Element, I tried then to put the button manually and it works normal even in runtime
here’s some screenshots :
Script Instantiating:
Manual Instantiate :
Script :
foreach (MatchDesc match in matchList.matches)
{
GameObject _roomListItemGO = Instantiate(roomListItemPrefab);
_roomListItemGO.transform.SetParent(roomListUI);
_roomListItemGO.GetComponentInChildren<Text>().text = match.name + " (" + match.currentSize + "/" + match.maxSize + ")";
_roomListItemGO.GetComponent<Button>().onClick.AddListener(delegate () { NetworkManager.singleton.matchMaker.JoinMatch(match.networkId, "", OnJoinInternetMatch); } );
}
Edit : The button works perfect on resolution of 1920 x 1080 and all other wide resolution
but for the others not
Even though i have a screen