How to reproduce Unity Editor native TextArea.
I'm trying to draw a scrollable textarea inside an editor. Many solutions in internet suggest something like:
textScroll = EditorGUILayout.BeginScrollView(textScroll, GUILayout.Height(60));
pageText = EditorGUILayout.TextArea(pageText, GUILayout.ExpandHeight(true), GUILayout.Width(200));
EditorGUILayout.EndScrollView();
But the result is very different from the native textarea in Unity if, for a property using the [TextArea] attribute, I write the following:
NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("pageText"));
As you can see in the image it looks like Unity does not use any scrollable view wrapping the actual textarea. It looks like the scrollbar simply drives the text content position. Plus the textarea has the TextClipping.Clip property in the style. Also the scrolling is driven by the mousewheel.
How can I reproduce this native textarea with all its features and with the same layout?
Your answer
Follow this Question
Related Questions
[Text Area] Not working properly - Unity 2019.3 Lighweight 2 Answers
Getting an array of objects to show in editor 1 Answer
Thin black lines between meshes 1 Answer
Why does this keep happening? 0 Answers
Unity editor - Keep columns narrow 0 Answers