Here is my code:
private void ResizeVertically(float height)
{
//_panelRectTransform.anchorMin.Set(0, height);
//_panelRectTransform.rect.Set(10, 10, 10, 10);
_panelRectTransform.sizeDelta.Set(0, height);
}
I have checked that _panelRectTransform is being set at Start() using the following code:
_panelRectTransform = this.GetComponent<RectTransform>();
When I run a GetType on _panelRectTransform after this, it is returning a Rect Transform object.
Here are the Inspector settings for the Rect Transform:
When I try to resize via code there seems to be no effect whatsoever. Anyone have any tips?