- Home /
Executing code at runtime
Is there a way to execute code at runtime? E.g. C# or javascript or Python code (or any other language for that matter) that user has inputted?
EDIT I am talking about a standalone executable and not for mobile or web. Also I would like to get the results or output of that code , not just execute it
In standalone projects (windows, mac) it is possible, the way i think it is possible is by creating source file of python and save it with .py extension and then fire a new process with argument of that filepath. in mobile platforms I can not see any way to implement it.
I will edit my question. Yes standalone. But I also need to get the results of that code. Not just execute it
Answer by stylophone · Jun 01, 2018 at 02:39 PM
I've been looking for the same solution too. So far the only way seems work would be using Lua with interpreters like MoonSharp or Nlua in Unity. Though I really don't like that language. But it works.
Answer by MT369MT · Jun 01, 2018 at 03:43 PM
Hi, I used the ICodeCompiler of Aeroson for create and compile script that user has inputted. Here the link:
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Having trouble swapping GameObjects on button click 1 Answer
Player Jumps instead of moving forward 0 Answers
help me converting js to c# 1 Answer