字符串textValue = gameObject。GetCompenenet & lt輸入字段& gt().文本;
構建壹個腳本來復制上面的代碼,並將該腳本放在InputField對象上。textValue是輸入文本框的字符串。