用于停用 InputField 以停止处理 Events 的函数,并且如果未取消,则发送 OnSubmit。
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.
public class Example : MonoBehaviour
{
public InputField mainInputField;
// Deactivates the main input field when the scene starts.
void Start()
{
mainInputField.DeactivateInputField();
}
}