问题描述
是否有一种传递诸如res/raw/myfile.lua
之类的文件以加载到AndroLua
中的方法.这些文件然后可能是compile time
处apk的一部分.谢谢
Is there a way to pass files like res/raw/myfile.lua
for loading in AndroLua
. These files could be then part of the apk at compile time
. Thanks
推荐答案
否,您目前不能,尽管这是个好主意,我可能会尽快实现.另外,这个问题最好转到 AndroLua问题.
No, you cannot currently, although this is a good idea and I may get to implement it soon. Also, this question would better go to AndroLua issues.
更新:
现在,您可以从应用程序资产加载模块.已使用资产中存储的示例模块greet.lua
更新了项目.这是通过为以下产品创建自定义的 Lua模块加载器来完成的Java中的require
,它使用AssetManager
加载模块.
Now you can load modules from application assets. The project has been updated with an example module greet.lua
stored in the assets. This was done by creating a custom Lua module loader for require
in Java which uses AssetManager
to load the module.
这篇关于AndroLua是否可以处理资源文件中的lua脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!