To instantiate a UI Text, I am using:
inv = Instantiate(Resources.Load(“UI/invItem”) as GameObject);
inv.transform.SetParent(inventoryUI.transform,false);
If I drag a version of this prefab into the canvas and hit play, it’s positioned perfectly, but when I instantiate it, the height of the parent canvas is added every frame to where ever i try to position it. I have the anchor presets to top left. Why are the instantiated versions misaligned like this?
Sorry if this is a beginner’s problem. I just can’t find the answer anywhere.