i am currently creating a 3d game in godot 4.2. in which i wanted to add a python editor or text editor inside my game environment where when player clicks on a button the editor should popup in front of the player and the player can run there code in it. Can anyone help me how to add the python editor inside my game.
If you do not care about actually running the user’s scripts, or have already sorted out a python interpreter, the like Opalion said a CodeEdit node will get you 90% there. Play with the syntax highlighter, it’s a little rigid but GDScript is based on python so you should be able to get pretty close to python pretty highlights.
Correct, based on is the wrong word to use. but it’s syntax is similar so the syntax highlighting process should be similar too. The very same doc page points this out
It uses an indentation-based syntax similar to languages like Python