using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class button2 : MonoBehaviour { public InputField t1,t2,t3; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void show2() { int n1,n2; n1 = int.Parse(t1.text); n2 = int.Parse(t2.text); t3.text = (n1 + n2).ToString(); } }