using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class script1 : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void docircle() { InputField input1 = GameObject.Find("InputField-num1").GetComponent(); Text label1 = GameObject.Find("Text-result").GetComponent(); label1.text = (2 * 3.14156f * int.Parse(input1.text)).ToString(); GameObject.Find("Button").GetComponentInChildren().text = "計算"; } }