- Home /
In-game script editing
So, I was wondering if it was possible to have an editor in-game, that when you type up a script in it, then it changes one of the scripts in the unity project itself. for example... in the game on an input field: types up "bob" in one of the scripts in the unity project: there appears a comment "bob"
is that possible?
Answer by Pangamini · Oct 09, 2021 at 06:05 PM
You can't change scripts that are part of the game. You could, however, include some language compiler in your game and let players write some scripts. There are two main options:
Compile C# and load it directly to the AppDomain. This gives you all the power that normal scripts in unity have, but there are some disadvantages. For example, an assembly that's once loaded, cannot be unloaded from it, ever.
Embed some custom scripting environment. Lua used to be very popular for game scripting, there's also a C# version called MoonSharp.
Your answer
Follow this Question
Related Questions
splatPrototypes not changing in exported game 0 Answers
Import custom avater pictures in game 2 Answers
Using Sublime Text 2 as a script editor on Mac 0 Answers
ingame button 1 Answer
In game editor 0 Answers