I am creating a game where I instantiate a prefab with a text component into a child of a canvas, and then edit the text variable. When I do so, the text doesn’t appear where it should relative to its rectTransform and text alignment. Changing the alignment has no affect, although I can change the font and colour. I can also change the position with the rTrans position and pivot, as well as scale and rotation. This prefab works in other canvases that I have in the scene at the same time, but the troublesome canvas is the only one in Screen Space (Cam) render mode. If I add a prefab before i play it, it works properly. I use two different prefabs with different pivots, and text alignments only; both don’t work. I have already implemented the function over a year ago, and it has worked as intended. It is only recently, when i was working on what I am pretty sure is unrelated, that this problem started, and I don’t know what the cause is.
There are no other scripts attached to the texts other than what is on the image.
There is a parent that changes scale but I didn’t think it would cause the error as it has worked while using it.