according to the document(quoted bellow for convenience)
public static Object Instantiate(Object original, Transform parent);
if I instantiate a prefab and pass a transform as the second parameter then the newly instantiated gameobject will be the child of the specific gameobject of the passed transform, right? And yet I presume that the position of the newly instantiated gameobject should be adjusted according to parent.
I made an UI-Image as a prefab: with the posX, posY configured and anchored as following:
And in the hierarchy:
And the instantiate C# script snippet:
GameObject pageIcon = transform.parent.FindChild("PageIcon").gameObject;
Instantiate(unSelectDot, pageIcon.transform);
And the result is that the newly instantiated object have a weird PosX and PosY: Why does that happen? who changed the PosX and PosY? Did I misunderstand something?