Question – TMPro in Text object in C# script

I have a script with a public Text variable named Text, but I cant drag on my TextMeshPro text on to it… What I want to do is have a variable (coins 1, coins 2, etc…) on 7 different TMPro UI objects
Here is the script:
public int coins1;
public int coins2;
public int coins3;
public int coins4;
public int coins5;
public int coins6;
public int coins7;

public Text text;

void Update()
{
text.text = string.Format(“x {0}”, coins1, coins2, coins3, coins4, coins5, coins6, coins7 );
}

 

Read more here: Source link