0

I am currently incorporating a scripting language into my engine, and after much research it seems LUA is the most appropriate in terms of platform compatibility and speed. After investigating, little has turned up as to whether a user will be able to edit LUA files within my iOS application in real-time.

The objective would be to have a single-line console input, to modify the environment, and then save back to file, ready to repeat the script on next load. I am cautious to advance, as I am unsure if the sandbox limitations over the I/O file systems would not allow this type of behavior.

4

1 回答 1

0

You can use luaL_loadstring to load arbitrary C strings, so yes. Just write the code that accesses the iOS filesystem yourself and use luaL_loadstring to load them.

See the Lua manual for details.

(By the way, it's Lua, not LUA. It isn't an acronym)

于 2013-07-24T22:34:12.367 回答