I have a cylinder (simple mesh created in unity), and I’m trying to change its height.
Well, I found a good solution for RectTransform:
RectTransform rT;
void Start(){
rT = GetComponent<RectTransform>();
}
void Update(){ //Increase height of UI element.
rT.sizeDelta = new Vector2(rT.sizeDelta.x,rT.sizeDelta.y + 0.5f);
}
But my GameObject does not have a RectTransform property. It has Transform only.
Any idea, please?