using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class script1 : MonoBehaviour { public InputField num1,num2,num3; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void doadd() { int a1 = int.Parse(num1.text); int a2 = int.Parse(num2.text); int a3 = a1 + a2; num3.text = a3.ToString(); } }