tolua错误之LuaException: cannot open tolua.lua: No such file or directory no file './tolua.lua'解决方案

LuaException: cannot open tolua.lua: No such file or directory no file ‘./tolua.lua’ no file ‘E:/unity3D/unity5.6.0f3/Editor/lua/tolua.lua’ no file ‘E:/unity3D/unity5.6.0f3/Editor/lua/tolua/init.lua’ no file ‘E:/Lua/5.1/lua/tolua.luac’ no file ‘c:/luaframework/lua/tolua.lua’ no file ‘tolua.lua’ in lua.unity3d LuaInterface.LuaState:LoadFileBuffer(String) (at Assets/LuaFramework/ToLua/Core/LuaState.cs:622) LuaInterface.LuaState:DoFile(String) (at Assets/LuaFramework/ToLua/Core/LuaState.cs:640) LuaInterface.LuaState:OpenBaseLuaLibs() (at Assets/LuaFramework/ToLua/Core/LuaState.cs:210) LuaInterface.LuaState:Start() (at Assets/LuaFramework/ToLua/Core/LuaState.cs:220) LuaFramework.LuaManager:InitStart() (at Assets/LuaFramework/Scripts/Manager/LuaManager.cs:26) LuaFramework.GameManager:OnInitialize() (at Assets/LuaFramework/Scripts/Manager/GameManager.cs:234) LuaFramework.GameManager:

解决方法:
点击菜单 Lua/Copy Lua files to resources,之后build apk.
参考:https://github.com/topameng/tolua/issues/75

你可能感兴趣的:(Unity,lua)