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

attach

attach(authority, child, parent, options?): AttachRefusal | null

Makes child’s pose follow parent’s every tick, after the physics step, on the world authority decides for: the room’s step, or findAuthority(world, child) for an entity only this page holds. Each option left out keeps the child where it stands from the parent now, as Unity’s SetParent keeps the world pose. Attaching an attached child to another parent moves it; to the same parent, changes only the options given. Returns null once attached, or why it attached nothing.

Parameter Type
authority EntityAuthority
child Entity
parent Entity
options AttachOptions

AttachRefusal | null