How can convert a UI item to normal item in runtime

Hi all,
I want the player to see a star in the middle of the screen (as a UI element).
Then when he presses it I want the star to go down and stick to the character’s head and shows the character is upgraded. How can I do it?

Look in the API at those classes and decide which of the dozens of methods is best suited to your game mechanic.

For starters, you don’t convert from one to the other. Instead you keep three different objects. One to represent the item in the UI and one to represent the item in the world. When the player “selects” the item in the UI you enable or instantiate the one in the world, animate it, and then attach it to the player once the animation ends.

Thanks the only thing is;
How to align the first UI item and the second (transition) item? One of them is UI and its position calculated by rect transform and the other’s position is calculated by world transform.
It is not easy to create an illusion without breaking some frames… (you know what I meant)

Unity’s camera class has a function for it.

var worldObjectPosition = Camera.main.ScreenToWorldPoint(uiObject.rectTransform.transform.position);

any solution for scaling?

transform.localScale = new Vector3.one * wantedScale;