public GameObject canvas; // the canvas
public Gameobject changerPopup; // UI prefab
GameObject changerSign = Instantiate(changerPopup, new Vector3(235, 350, 0), this.transform.rotation);
changerSign.transform.SetParent(canvas.transform);
this will make a UI at the screen. while it does make the object as wanted, the rect transform won’t get fixed(?) to the newly set parent(the Canvas), but instead to where it was first made. how could I get it under canvas’s rect transform? could be some too basic question, but couldn’t find any answer anywhere so far ![]()
I tried that, also tried
GameObject changerSign = Instantiate(changerPopup, new Vector3(235, 350, 0), this.transform.rotation, canvas.transform);
but still don’t gets under canvas rect transform.
struggling with this for 8 hours with no luck… anyone know how to solve this mess, well I’ll really be grateful ![]()
using unity 5.5.1