I’m wanting to create a code editor in unity using UIElements. However, I do not want to start from scratch. (Build a text editor with all of the features such as select and such). In other words, I’d like to modify the built in text field.
Any ideas on how I should begin? I’m new to UIElements, I understand the basics but I’m not intuitive at it
I’ve managed to get a nice editor up and running by using uGUI by having a transparent text area as the input, and a text area on top of that with rich text / syntax applied as the visual. It works pretty well
I had to do the same thing a couple of years ago in IMGUI, and wound up layering a label over a textbox, or something like that. Please think about adding support for this. We make heavy use of custom editors, for Dialogs, Quests, Scene logic, to a load of other things. We don’t want a custom scripting language since we want the compiler to catch every error it can (makes my life debugging everyone elses scripting much easier), so I have editors that allow you to write your custom scripts in c#, and then the editors create c# files from their data when saved.
I really just want to have a single textfield / textbox that I can style however I want as needed … it would clean things up tremendously in the future.
That repo is pretty out of date, looks like I never included actual syntax highlighting, and instead just included the base editor. I’ll update it with syntax highlighting support in the next few days. It won’t come with C# highlighting out of the box, though.