namespace UIWidgets { using System; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; /// /// InputFieldProxy. /// public class InputFieldNull : IInputFieldProxy { /// /// Initializes a new instance of the class. /// public InputFieldNull() { } #region IInputFieldProxy implementation /// /// The current value of the input field. /// /// The text. public string text { get { return null; } set { } } readonly InputField.OnChangeEvent changeEvent = new InputField.OnChangeEvent(); /// /// The Unity Event to call when edit. /// /// The OnValueChange. public UnityEvent onValueChanged { get { return changeEvent; } } readonly InputField.SubmitEvent submitEvent = new InputField.SubmitEvent(); /// /// The Unity Event to call when editing has ended. /// /// The OnEndEdit. public UnityEvent onEndEdit { get { return submitEvent; } } /// /// Current InputField caret position (also selection tail). /// /// The caret position. public int caretPosition { get { return 0; } set { } } /// /// Is the InputField eligible for interaction (excludes canvas groups). /// /// true /// false public bool interactable { get { return true; } set { } } /// /// Determines whether InputField instance is null. /// /// true /// false public bool IsNull() { return true; } /// /// Gets the gameobject. /// /// The gameobject. public GameObject gameObject { get { return null; } } /// /// Text component. /// public Graphic textComponent { get { return null; } set { } } /// /// Placeholder. /// public Graphic placeholder { get { return null; } set { } } /// /// If the proxy was canceled and will revert back to the original text. /// public bool wasCanceled { get { return false; } } /// /// Determines whether this lineType is LineType.MultiLineNewline. /// /// true /// false public bool IsMultiLineNewline() { return false; } /// /// Function to activate the InputField to begin processing Events. /// public void ActivateInputField() { } #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 /// /// Move caret to end. /// public void MoveToEnd() { } #endif /// /// Set focus to InputField. /// public void Focus() { } /// /// Set focus to InputField. /// public void Select() { } #endregion } }