- Home /
How to make a text editor in unity ? Please help me urgently
Please pleaseeeeeee help me ! I TRIED HTML AND JAVASCRIPT BUT THE 3D MODELS WONOT LOAD SO I WENT TO UNITY AND I CANOT EMBED HTML because it seeems that there are no more frameworks that supports embedding html in unity.I just want to load a code editor in the scene or a text editor ! NOthing else ! can anyone please help because i am just 2 inches away from killing myself because this stop idea
You can use the GUI elements (either I$$anonymous$$GUI or the newer GUI system) to make a very simple text editor. It will allow you to edit text. You haven't really stated what you want this text editor to do though, or why you want a text editor, or even generally what you are trying to accomplish.
Answer by adrienPlayerium · Aug 10, 2017 at 12:08 AM
https://docs.unity3d.com/ScriptReference/UI.TextEditor.html
Don't kill yourself just yet >,<
i think you didn't understand me,or i am not being clear. I want to "embed" a code editor in the scene. Like ace editor or codemirror.I want it to be part of the game
I think he want to make a smart font bit like in notepad++ or something like that... I am not sure about HT$$anonymous$$L in unity, but he might want to use RichText , it can give a similar feeling
yes yes yes i want to use something like notepad++ ! but i want it to be in the scene ! It 's a part of the game and i donot want it in the inspector only the scene ,can you help me?
Answer by Bunny83 · Aug 13, 2017 at 12:28 PM
If you want a simple text editor, just use an InputField when you want to use the new UI system or simply use GUILayout.TextArea inside OnGUI if you prefer the imgui system.
If you use the InputField make sure you set multiLine to true.