When I try to compile my script in "il2cpp", I get this error:
System.NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: NLua.MetaFunctions::CollectObject
at KeraLua.Lua.LuaPushStdCallCFunction (System.IntPtr luaState, KeraLua.LuaNativeFunction fn) [0x00000] in <00000000000000000000000000000000>:0
at NLua.ObjectTranslator.CreateBaseClassMetatable (KeraLua.LuaState luaState) [0x00000] in <00000000000000000000000000000000>:0
at NLua.ObjectTranslator..ctor (NLua.Lua interpreter, KeraLua.LuaState luaState) [0x00000] in <00000000000000000000000000000000>:0
at NLua.Lua.Init () [0x00000] in <00000000000000000000000000000000>:0
at NLua.Lua..ctor () [0x00000] in <00000000000000000000000000000000>:0
at InitAddons.InitLuaFile (System.IO.FileInfo fileInfo) [0x00000] in <00000000000000000000000000000000>:0
at InitAddons.FindLuaOnDir (System.String dirPath) [0x00000] in <00000000000000000000000000000000>:0
at InitAddons.FindAddons () [0x00000] in <00000000000000000000000000000000>:0
at InitAddons.Awake () [0x00000] in <00000000000000000000000000000000>:0
How can it be solved? It appears when I try to create an object "Lua luaState = new Lua ();"
Code fragment (this procedure is called after two others which are called in "Awake"):
When I try to compile my script in "il2cpp", I get this error:
How can it be solved? It appears when I try to create an object "Lua luaState = new Lua ();"
Code fragment (this procedure is called after two others which are called in "Awake"):