Hi all,
I need the ability to export a simple API to my game users and the ability for these users to enter simple scripts and have my Unity-based game run their script during gameplay… Can this be done?
I searched for an ‘eval’ or ‘exec’ statement but this Unity game runtime doesn’t appear to have the ability to JIT compile a string and execute some of my API functions.
My game doesn’t run in the WebPlayer so could not rely on calls such as Application.ExternalEval or Application.ExternalCall. (If such functionality were available in non-WebPlayer game builds I could save the day with that!
What are possible alternatives?
- A way to JIT compile Mono code in game runtime.
- An external library I can ship with my game to allow me to export an API and give game players scripting (Mono/C# prefered but other languages like Python a possibility)
- Could I embed Internet Explorer in my game, export my API and export scripting through that?
- Or maybe it’s something I’m overlooking on what the game runtime can do?
Thanks for any hint!!
Dan