输入框回车
GUI.SetNextControlName("InputFieldLC"); inputLC = GUI.TextField(new Rect(Screen.width / 2 + 240,Screen.height - 30,100,20),inputLC); if(GUI.Button(new Rect(Screen.width / 2 + 340, Screen.height - 30,40,20),"定位")) { if(wwwIng == false) { wwwIng = true; Application.ExternalCall("DingWeiLC", qjModel.lloryl, inputLC, qjModel.lx); } } if (Event.current.isKey && Event.current.keyCode == KeyCode.Return && GUI.GetNameOfFocusedControl() == "InputFieldLC") { if(wwwIng == false) { wwwIng = true; Application.ExternalCall("DingWeiLC", qjModel.lloryl, inputLC, qjModel.lx); } }

浙公网安备 33010602011771号