Use this for initialization
()
| 17 | LuaEnv luaenv = null; |
| 18 | // Use this for initialization |
| 19 | void Start() |
| 20 | { |
| 21 | luaenv = new LuaEnv(); |
| 22 | luaenv.AddLoader((ref string filename) => |
| 23 | { |
| 24 | if (filename == "InMemory") |
| 25 | { |
| 26 | string script = "return {ccc = 9999}"; |
| 27 | return System.Text.Encoding.UTF8.GetBytes(script); |
| 28 | } |
| 29 | return null; |
| 30 | }); |
| 31 | luaenv.DoString("print('InMemory.ccc=', require('InMemory').ccc)"); |
| 32 | } |
| 33 | |
| 34 | // Update is called once per frame |
| 35 | void Update() |
nothing calls this directly
no outgoing calls
no test coverage detected