Available configurations
Project Settings
In the Project -> Project Settings... window, the following configurations are available:
- Lua PluginScript/Package Path/Behavior: Whether templates will replace
package.path,
be appended to it or prepended to it.
Default behavior:
replace. - Lua PluginScript/Package Path/Templates: List of templates to be
injected into package.path.
Default templates:
res://?.luaandres://?/init.lua. - Lua PluginScript/Package C Path/Behavior: Whether templates will replace
package.cpath,
be appended to it or prepended to it.
Default behavior:
replace. - Lua PluginScript/Package C Path/Templates: List of templates to be
injected into package.cpath.
Default templates:
!/?.dlland!/loadall.dllon Windows,!/?.soand!/loadall.soelsewhere. - Lua PluginScript/Export/Minify On Release Export: Whether Lua scritps
should be minified on release exports.
Defaults to
true.
Configuring package.path and package.cpath
Templates for package.path and package.cpath accept paths starting with
Godot's Resource path res:// and User path user://.
Also, the special character ! represents the executable directory.
When running a standalone build, it will be replaced by the directory of the executable path
(OS.get_executable_path().get_base_dir()).
When opening the project from the editor, it will be replaced by the project root
(ProjectSettings.globalize_path("res://")).
When the behavior is configured to replace, paths coming from the environment
variables LUA_PATH and LUA_CPATH will also be replaced.