Funzione statica
Lento
Package.Require
Loads a .lua file. Note that this method caches the result, so further calls return the cached value.<br/><br/>We currently support 5 searchers, which are looked in the following order:<ol><li>Relative to <code>current-file-path/</code></li><li>Relative to <code>current-package/Client/</code> or <code>current-package/Server/</code> (depending on your side)</li><li>Relative to <code>current-package/Shared/</code></li><li>Relative to <code>current-package/</code></li><li>Relative to <code>Packages/</code></li></ol><p>Note: Clients will only download and have access to <code>Client/</code> and <code>Shared/</code> folders.</p>
Non ancora tradotto
Sintassi
Package.Require(file_path, force_load = false)
Parametri
| Nome | Tipo | Predefinito | Descrizione |
|---|---|---|---|
file_path
|
string | — | Path to the script file to load |
force_load
facoltativo
|
boolean | false |
Whether to force loading this file even if it was already loaded |
Valore restituito
- any any return values from the included file