Hello Guys,
I have ran into a problem and am hoping that I will be able to find some help here.
I have set up a scrolling textbox that does work, it is of a small project that I am working with - it’s part of a Unity course I am doing online. The course wanted you to just use a standard static textbox with programmatically changing text - so, I thought why not go an extra step and the box able to scroll when needed and dynamically change size depending on how much text is thrown into it.
I tried using RectTransform component and the : sizeDelta=newVector2(); method, but, I found this code online and I’m not sure what the variable used are for, or, whether they will work. I get very unpredictable results, I just don’t understand this code:
- rt.sizeDelta=newVector2(rt.rect.width,text.preferredHeight);
So would anyone be able to me whether what I am trying to do is easy enough to do or will it take a very in-depth knowledge to do it and leave it out for the time being and be happy with my scrolling box?
Thanks and Regards,
CK.