Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

packEntities

packEntities(world, entities): PackedEntities

Packs entities, each with every trait it holds as it stands, into data a trait holds and a checkpoint keeps: what spawnPacked copies later, after the originals are gone. As Godot’s PackedScene.pack, for what Roblox’s Clone and Unity’s Instantiate copy live. A machine’s state is its record’s; a view’s object and a page’s stream key are made again on the copy. A trait whose value is not data, such as a function, throws in a development world, naming the trait and the field, and in a deployed one is left out, logged once.

Parameter Type
world World
entities readonly Entity[]

PackedEntities