Instantiate buttons , each with a unique positioning

How could I Instantiate level buttons (like 80 ), each with a unique positioning?
I need to set the position manually for each of them. (i know is weird, but this is the desing)

I know that I would need empty gameObjects for each position, but I don’t Know how to put this in the Instantiate code. So if anybody has any suggestion, I would really appreciate !

Thank you!!

Hello,

What you need to have is a class (a script) that is in charge of instantiating a button.
This class knows a prefab that is your button model :

public class ButtonMaker : MonoBehaviour {

    public Prefab buttonModel;
   
    public void CreateButton()
    {
          RectTransform myButton = Instantiate(buttonModel as RectTransform);
    }
}

Call the CreateButton method for each button you need to create.

Then you put the properties of the button like you want. Complete the ButtonMaker class to be able to set the properties you need as you like.

For example, put the ButtonMaker on the GameObject parent of all your buttons then do :

myButton.SetParent (transform, false);

Position is the second parameter you pass to Instantiate…

Instantiate(UniqueButtonPrefab, new Vector3(UniqueButtonX, UniqueButtonY, UniqueButtonZ), Quaternion.identity);