/// <summary> /// Create text input field /// </summary> /// <param name="_enterCallback">Callback when pressed enter key</param> /// <param name="pos">Position of the text field</param> /// <param name="_maxInput">Maximum allowed input</param> public void CreateTextInputField(TextInputField.Callback _enterCallback, Vector2 pos, int _maxInput) { TextInputField temp = Instantiate(textInputField); temp.transform.position = pos; temp.SetCallback(_enterCallback); temp.maxInput = _maxInput; currentInput = temp; }