Prefablist
Based on game build 718694 | Last updated: 2026-04-04
Overview
prefablist.lua defines a global table PREFABFILES containing an ordered list of all prefab names registered in the game. This file is generated by exportprefabs.lua and serves as a master index for entity definitions. It is a read-only data source used by internal systems to validate or iterate over available prefabs; it does not contain logic, components, or runtime behaviors.
Usage example
require "prefablist" -- Ensure the file is loaded to define the global
-- Iterate over all known prefabs
for _, prefab_name in ipairs(PREFABFILES) do
print("Available prefab:", prefab_name)
end
-- Validate if a string matches a known prefab
local function IsPrefabRegistered(name)
for _, v in ipairs(PREFABFILES) do
if v == name then
return true
end
end
return false
end
Dependencies & tags
Components used: None identified Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
PREFABFILES | table | — | Global Variable defined upon loading the file. Array-indexed table containing strings; each entry represents a valid prefab name (e.g., "axe", "beefalo"). |
Main functions
None identified.
Events & listeners
None.