Skip to content

Prefab

The Prefab class extends the base Item class to represent prefabricated objects within the game engine.

Inherits from

Item

Usage

To use this class, add the following require at the top of your script:

local Prefab = require 'engine/items/prefab'

Reference

create

static create(self, attributes)

Create a new prefab

Parameters

  • self
  • attributes (table): list of attributes. without, the prefab will be created with default values

Returns

  • Prefab: of the created prefab