- Home /
Question by
Armadillq_ · Apr 14, 2018 at 03:31 AM ·
uitexturetextconvert
Converting UGUI text to 3D text.
Im trying to create a script that takes the amount that is shown in the UI onto 3D text in my Scene. If anyone has tips or solutions that would be appreciated
public class VaultScript : MonoBehaviour {
public TextMeshPro VaultBalance;
public TextMeshProUGUI MoneyBalance;
public int MoneyBalanceint;
public GameObject Vault;
public void Start()
{
}
public void OnMouseDown()
{
MoneyBalance.text = MoneyBalanceint.ToString();
VaultBalance.text = "$" + MoneyBalanceint.ToString();
MoneyBalance.text = "$0";
Debug.Log("Money Deposited");
}
}
Comment
Your answer
Follow this Question
Related Questions
How to render html text in new UI system (unity 4.6) 0 Answers
How to have a texture instead of a color as a background of Text? 0 Answers
Preference settings for commonly used items? 0 Answers
How to get the current "best fit" size of a Text component? 3 Answers
Is there a way to find the current font size of a Text? 2 Answers