Log inGet started
Package

adoptParts.module

Newest version

README.md

adoptParts

Keeps a shared (synced) object whole on every player's machine. A scene record under a synced entity is built by each peer, but a peer that receives the synced entity over the network loads its authored children at the scene root, detached at the origin. The owner publishes its children's ids in a synced string field; every other peer re-attaches those entities under the shared one, keeping their authored local transforms.

local adopt = require("stations.adoptParts")
-- in update(): public.partIds is a Field.string("", Sync, ...)
public.partIds = adopt.keep(rootEntity, public.partIds)