Input Field – TextMeshPro

2075 / Unity / Меню / Input Field – TextMeshPro

 

using UnityEngine;
using TMPro;

public class Menu : MonoBehaviour
{
  public TMP_InputField t1;
  public TMP_InputField t2;
  public TMP_InputField t3;
  
  public void ButtonPlus()
  { 
    float a = float.Parse(t1.text);
    float b = float.Parse(t2.text);
    float c = a + b;
    t3.text = c.ToString();
  }
}