Prefablist
Based on game build 722832 | Last updated: 2026-04-28
Overview
prefablist.lua defines a global array-indexed table PREFABFILES containing string identifiers for every prefab registered in the game. This file is auto-generated by exportprefabs.lua and serves as a central registry for prefab discovery. Other systems iterate over this table to validate prefab names, populate UI lists, or perform bulk operations across all entities. This is a configuration source — it is not a component and does not attach to entities.
Usage example
local PREFABFILES = require "prefablist"
-- Iterate over all registered prefabs
for i, prefabname in ipairs(PREFABFILES) do
print(i, prefabname)
end
-- Check if a prefab exists in the registry
local function IsPrefabRegistered(name)
for _, v in ipairs(PREFABFILES) do
if v == name then
return true
end
end
return false
end
-- Access specific entries by index
local first = PREFABFILES[1] -- "abigail"
local count = #PREFABFILES -- Total prefab count
Dependencies & tags
External dependencies: None identified
Components used: None identified
Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
PREFABFILES | table | — | Array-indexed global table of string prefab names; position corresponds to registration order. |
[n] | string | — | Individual prefab name at index n (e.g., "abigail", "beefalo", "wilson"). |
Main functions
None. This file exports data only — no functions are defined.
Events & listeners
None.