Text Fields on the UI Toolkit can take a maximum of 12k characters.
It takes 4 and max 65k vertex for each character due to rendering, there must be a way to overcome this?
I tried to modify method with Reflection in Text Element on this method
void INotifyValueChanged<string>.SetValueWithoutNotify(string newValue)
{
newValue = ((ITextEdition)this).CullString(newValue);
if (m_Text != newValue)
{
renderedText = newValue;
m_Text = newValue;
IncrementVersion(VersionChangeType.Layout | VersionChangeType.Repaint);
if (!string.IsNullOrEmpty(base.viewDataKey))
{
SaveViewData();
}
}
if (editingManipulator != null)
{
editingManipulator.editingUtilities.text = newValue;
}
}
In this method, I am trying to synchronise renderedText to the culled value and m_Text to the original value, otherwise the value reflected in ValueChange callbacks is always the culled value.
Even if the displayed text is short, I try to preserve the value it contains.
I couldn’t achieve what I said with reflection, I couldn’t reach the necessary places …
Is there a better way or a way to overcome this as it should be, please…