ScriptingNetworking

Network Components

The ready made components that sync pickups, seats, transforms, rigidbodies and parameters without code.

Most syncing needs no script. Add one of these components and configure it in the inspector. Uploaded means the component is on the default allowlist for uploaded worlds and props; the others work in client builds, or after you add them to the content police selectors (see Allowed Components).

ComponentSyncsUploadedNotes
Basis Pickup Sync NetworkingA held object's pose and who holds it.YesTakes ownership on grab. CanNetworkSteal, AttachToHandOnGrab, FullRateWhileHeld, RemoteDeadReckon.
Basis Synced TransformPosition, rotation and scale. Per axis toggles and compression.YesFor anything the owner moves from code or animation.
Basis Seat SyncWho sits in a Basis Seat.YesArbitrates when two players try to sit at once.
Basis Media PlayerVideo URL, play state and time.YesSee Media Player.
Basis Synced RigidbodyPose plus linear and angular velocity.NoRemote copies are kinematic (DriveRemoteKinematic) and follow the owner's simulation.
Basis Synced ParametersNamed values: floats, vectors, colours, ints, bools.NoSee Synced Variables.

Basis Object Sync Networking is deprecated. It still loads in old content as a pickup, but new content should use Basis Pickup Sync Networking.

A synced pickup

  1. Add a collider and a Rigidbody to the object.
  2. Add Basis Pickup Interactable.
  3. Add Basis Pickup Sync Networking and assign the pickup to its BasisPickupInteractable field.

The inspector shows live sync state (owner, buffer depth, bandwidth) in play mode.

Cilbox

Cilbox scripts cannot derive from the sync components, but they can sit next to them: let Basis Synced Transform move the object and use a BasisNetworkShim for everything else.

Avatars

Avatars allow BasisSyncedTransform, BasisPickupSyncNetworking and BasisNetworkShim. See Avatar Scripting.

Edit on GitHub

Last updated on