I am having difficulty instantiating a Text object as a child of a panel. The position parameter appears to place it’s position with respect to the canvas and not the panel I am specifying.
I have a prefab ScoreboardNameTMPText of type TextMeshProUGUI.
Instantiate(ScoreboardNameTMPText, new Vector3(0, 0, 0), Quaternion.identity, ScoreboardPanel.transform);
Does not place the text at the 0,0,0 location of the panel, but rather at the 0,0,0 location of the canvas.
If the prefab is placed in the panel in the editor, (0,0,0) refers to the panel, not the canvas.
How can I instantiate this UI prefab with a position wrt it’s parent panel?