3 ms·
For readers, Lua does this in the form: require( "engine.shared.entities" ) or require "engine.shared.entities" Which means look for: engine/sh
by andrewmcwatters 8y ago
For readers, Lua does this in the form:
require( "engine.shared.entities" )
or
require "engine.shared.entities"
Which means look for:
engine/shared/entities.lua
Additionally, with the `package` module, `require` can also be modified to look for:
engine/shared/entities/init.lua`
which is a common Lua practice.
- sephoric 8y agoLua can also be modified to have "engine.shared.entities" look for a file named "/engine-shared-entities.lua" and similar things. The creators have cited that Lua is sometimes used in environments where directories do not exist, only files.