Solution: All in DialogueEditor.DrawNode()
- Enable GUI.skin.textField.wordWrap
- Use EditorGUILayout.TextArea (instead of TextField)
- Apply basic math to constrain the dynamic textArea size
Only need two lines of code, though I added some if/else so I can toggle between a field and area.
GUI.skin.textField.wordWrap = true;
node.SetText(EditorGUILayout.TextArea(node.GetText(),
GUILayout.MaxHeight(node.GetRect().height - node.GetRect().height * .60f)));```
[original post]
Trying to figure out how to create a larger text area in the node, but not sure how to apply it to the exiting field so that the text wraps as intended.
Any help would be appreciated!
Image shown as example:
node.SetText(EditorGUILayout.TextField(node.GetText(), GUILayout.MinHeight(60)));