When using Rect.set(), the rect does not change. I don’t know how else to better explain it. Here is the code, with unimportant parts removed.
RectTransform DialogueBoxRect = new RectTransform();
void Awake()
{
Player.DialogueBox = GameObject.Find("DialogueBox");
if(Screen.width < 1280)
{
DialogueBoxRect.rect.Set(0, 14, Screen.width - 20, 300); // Dialogueboxrect HAS already been defined and set
}
}
It returns no errors, but it does absolutely nothing. It should be changing the dialogue box’s size to less than the screen, so that it can played in the gameview and be read, but it is still too big. Any help is appreciated, thanks in advance.