La UI puede crearse dinámicamente desde código.

Ejemplo: generar botones, slots o entradas de una lista.

Prefab

[SerializeField]
private GameObject prefabSlot;

[SerializeField]
private Transform contenedor;

Instanciar

GameObject slot = Instantiate(
    prefabSlot,
    contenedor
);

Obtener componentes

TMP_Text texto =
    slot.GetComponentInChildren<TMP_Text>();

texto.text = "Espada";

Limpiar lista

foreach (Transform hijo in contenedor)
{
    Destroy(hijo.gameObject);
}

Ejemplo de inventario

foreach (Item item in inventario)
{
    GameObject slot =
        Instantiate(
            prefabSlot,
            contenedor
        );

    TMP_Text texto =
        slot.GetComponentInChildren<TMP_Text>();

    texto.text = item.nombre;
}

Resumen rápido

Instantiate(prefab, parent)
GetComponentInChildren<T>()
Destroy(...)