Coder Social home page Coder Social logo

添加lua之间搜索路径 about xlua HOT 4 CLOSED

tencent avatar tencent commented on June 13, 2024
添加lua之间搜索路径

from xlua.

Comments (4)

chexiongsheng avatar chexiongsheng commented on June 13, 2024 1

1、lua的原生lua文件加载机制还是可以用的,可以通过package.path去设置;
2、可以用CustomLoader,这个可以由你来控制,在网络,内存里头加载都可以;
3、xLua默认提供了从Resources加载的Loader,这个require的路径都是从Resources往下找,不会根据require调用所在文件的路径去找相对目录。

from xlua.

wulei avatar wulei commented on June 13, 2024

👍

from xlua.

Ander456 avatar Ander456 commented on June 13, 2024

2.可以用CustomLoader,这个可以由你来控制,在网络,内存里头加载都可以;
设置了这个之后 lua原生的 package.path 是否就不生效了。

from xlua.

chexiongsheng avatar chexiongsheng commented on June 13, 2024

2.可以用CustomLoader,这个可以由你来控制,在网络,内存里头加载都可以; 设置了这个之后 lua原生的 package.path 是否就不生效了。

生效,不过不建议用package.path。

from xlua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.