Moving a text box

I have a textbox with a Rect Transform at Left: 463 Top: 480 Pos Z: 0 Right: 0 Bottom: -43.79999. What I’m looking to do is move the textbox from where it is to Top: 435 but I can’t see how to access the RectTransform’s Top value.

Edit: I am using Unity 5.2 if this matters.

You are asking: “How can I move/animate this Text Element using its RectTransform”?

Is there anything here that can help you?

http://docs.unity3d.com/Manual/HOWTO-UIScreenTransition.html
http://docs.unity3d.com/Manual/class-RectTransform.html

Let me know if you get this working…

1 Like

I got it to work Adam! I can’t tell you how many times I read Unity - Scripting API: RectTransform
I feel so happy to finally have my textbox moving :smile: Thanks again Adam!

Oh the answer was to access the GetComponent<RectTransform>().offsetMax.y which gives to access to the TOP value. So I just did a transform.Translate on the textbox and I got it to slide up and then slide down.

offsetMax = TOP and RIGHT
offsetMin = BOTTOM and LEFT