private float countTextHeight()
{
InputField inputField = talkBox.transform.GetComponent<InputField>();
TextGenerator m_TextGenerator = inputField.textComponent.cachedTextGenerator;
TextGenerationSettings settings = inputField.textComponent.GetGenerationSettings(new Vector2(inputField.GetComponent<RectTransform>().rect.width, 0));
settings.fontSize = playerInputTextSize;
settings.lineSpacing = 1;
settings.verticalOverflow = VerticalWrapMode.Overflow;
float height = m_TextGenerator.GetPreferredHeight(inputField.text, settings);
return height;
//inputField.GetComponent().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height); }
//return 1f;
}