MCPcopy Create free account
hub / github.com/Tencent/xLua / Start

Method Start

Assets/XLua/Tutorial/LoadLuaScript/Loader/CustomLoader.cs:19–32  ·  view source on GitHub ↗

Use this for initialization

()

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected