how to resize a panel unity code example
Example: how to resize a panel unity
// To Change the "Scale" property use localScale, like this
// Change the numbers in the "()" to your choosen scale
public GameObject YourPanel;
YourPanel.GetComponent().localScale = new Vector3(newWidthUI, newHeightUI, 1);
// If you want to change it in pixels
public GameObject yourUI;
yourUI.GetComponent().sizeDelta = new Vector2(newWidthUI,newHeightUI);